Skip to content

Commit

Permalink
Merge pull request #11 from mountaindude/main
Browse files Browse the repository at this point in the history
1.0.1 RC
  • Loading branch information
mountaindude authored Jun 10, 2021
2 parents dba9122 + 2bded47 commit b5bd9f2
Show file tree
Hide file tree
Showing 9 changed files with 500 additions and 877 deletions.
55 changes: 28 additions & 27 deletions .drone.yaml
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
kind: pipeline
type: docker
name: linux-amd64

platform:
arch: amd64
os: linux

steps:
- name: docker
image: plugins/docker
settings:
username:
from_secret: dockerhub_username
password:
from_secret: dockerhub_password
repo: ptarmiganlabs/butler-auth
dockerfile: src/docker/Dockerfile.amd64
context: src
auto_tag: true
auto_tag_suffix: linux-amd64
when:
event:
- tag
# kind: pipeline
# type: docker
# name: linux-amd64

# platform:
# arch: amd64
# os: linux

# steps:
# - name: docker
# image: plugins/docker
# settings:
# username:
# from_secret: dockerhub_username
# password:
# from_secret: dockerhub_password
# repo: ptarmiganlabs/butler-auth
# dockerfile: src/docker/Dockerfile.amd64
# context: src
# auto_tag: true
# auto_tag_suffix: linux-amd64
# when:
# event:
# - tag

---
kind: pipeline
Expand Down Expand Up @@ -50,8 +50,8 @@ trigger:
event:
- tag

depends_on:
- linux-amd64
# depends_on:
# - linux-amd64


---
Expand Down Expand Up @@ -107,4 +107,5 @@ trigger:
- tag

depends_on:
- linux-arm
- linux-arm
- linux-arm64
91 changes: 91 additions & 0 deletions .github/workflows/docker-image-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions

# Inspiration
# https://github.com/actions/starter-workflows/blob/main/ci/docker-publish.yml

name: Build Docker image CI

on:
push:
branches: [ main ]
# Publish semver tags as releases.
tags: [ 'v*.*.*' ]
# push:
# branches: [ master ]
# # Publish semver tags as releases.
# tags: [ 'v*.*.*' ]

jobs:
build:

runs-on: ubuntu-latest
permissions:
contents: read
packages: write

strategy:
matrix:
node-version: [14.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Set up QEMU
uses: docker/setup-qemu-action@v1

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1

# Login against a Docker registry except on PR
# https://github.com/marketplace/actions/docker-login
# https://docs.github.com/en/actions/reference/context-and-expression-syntax-for-github-actions#github-context
- name: Login to Docker Hub
uses: docker/login-action@v1
if: |
github.event_name != 'pull_request'
# if: |
# github.event_name != 'pull_request' ||
# github.repository_owner == 'ptarmiganlabs'
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

# Extract metadata (tags, labels) for Docker
# https://github.com/marketplace/actions/docker-metadata-action
- name: Extract Docker metadata
id: meta
uses: docker/metadata-action@v3
with:
# images: ${{ env.IMAGE_NAME }}
images: ${{ github.repository }}
tags: |
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
- name: Show Docker tags that will be used
run: echo '${{ steps.meta.outputs.tags }}'

- name: Show Docker labels that will be used
run: echo '${{ steps.meta.outputs.labels }}'

- name: Build and push
id: docker_build
uses: docker/build-push-action@v2
with:
context: ./src
platforms: |
linux/amd64
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

- name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}

env:
CI: true
10 changes: 10 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,16 @@

Releases are avaible on the GitHub [releases page](https://github.com/ptarmiganlabs/butler-auth/releases).

## 1.0.1

### New features

### Fixes and patches

* Updated dependencies to latest versions.

### Changed behavior and/or breaking changes

## 1.0.0

First release.
Expand Down
1 change: 0 additions & 1 deletion src/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# Dockerfile for manual building of image
# Build Docker image for Amd64
FROM node:12-stretch

Expand Down
2 changes: 1 addition & 1 deletion src/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
version: '3.3'
services:
butler-auth:
image: ptarmiganlabs/butler-auth:1.0.0
image: ptarmiganlabs/butler-auth:1.0.1
container_name: butler-auth
restart: always
ports:
Expand Down
28 changes: 0 additions & 28 deletions src/docker/Dockerfile.amd64

This file was deleted.

5 changes: 0 additions & 5 deletions src/docker/manifest.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,6 @@ tags:
{{/each}}
{{/if}}
manifests:
-
image: ptarmiganlabs/butler-auth:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-amd64
platform:
architecture: amd64
os: linux
-
image: ptarmiganlabs/butler-auth:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-arm64
platform:
Expand Down
Loading

0 comments on commit b5bd9f2

Please sign in to comment.