diff --git a/.github/workflows/docker-build.yml b/.github/workflows/docker-build.yml new file mode 100644 index 0000000..2ca2c14 --- /dev/null +++ b/.github/workflows/docker-build.yml @@ -0,0 +1,48 @@ +name: Publish Docker Images + +on: + push: + branches: [ main, github-workflow-build ] + paths-ignore: + - 'README.md' + - 'LICENSE' + +jobs: + build: + name: Build Passer release + runs-on: ubuntu-latest + + steps: + - + name: Checkout code + uses: actions/checkout@v2 + - + name: Set up QEMU # used for arm builds + uses: docker/setup-qemu-action@v1 + - + name: Setup Docker Buildx + uses: docker/setup-buildx-action@v1 + - + name: Login to DockerHub + uses: docker/login-action@v1 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_TOKEN }} + - + name: Cache Docker layers + uses: actions/cache@v2 + with: + path: /tmp/.buildx-cache + key: ${{ runner.os }}-buildx + restore-keys: | + ${{ runner.os }}-buildx + - + name: Build and push + uses: docker/build-push-action@v2 + with: + platforms: linux/amd64,linux/arm64,linux/arm/v7 + tags: | + activecm/passer:test + push: true + cache-from: type=local,src=/tmp/.buildx-cache + cache-to: type=local,mode=max,dest=/tmp/.buildx-cache