From 4ed6f721b59a2ba0ca1908f93ce799012a0257d1 Mon Sep 17 00:00:00 2001 From: Daniel Bodky Date: Wed, 6 Apr 2022 21:22:53 +0200 Subject: [PATCH] Revamped GitHub Actions --- .github/workflows/build-latest.yml | 30 +++++++++++++++++++ .../{docker-build.yml => build-release.yml} | 8 +++-- 2 files changed, 36 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/build-latest.yml rename .github/workflows/{docker-build.yml => build-release.yml} (69%) diff --git a/.github/workflows/build-latest.yml b/.github/workflows/build-latest.yml new file mode 100644 index 0000000..8563d98 --- /dev/null +++ b/.github/workflows/build-latest.yml @@ -0,0 +1,30 @@ +name: Docker Image CI + +on: + push: + branches: + - 'main' + +jobs: + docker: + runs-on: ubuntu-latest + + steps: + - name: Checkout + 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 + - name: Login to DockerHub + uses: docker/login-action@v1 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + - name: Build and push image(s) + uses: docker/build-push-action@v2 + with: + push: true + context: . + platforms: linux/amd64 + tags: dbodky/dashing-icinga2:latest diff --git a/.github/workflows/docker-build.yml b/.github/workflows/build-release.yml similarity index 69% rename from .github/workflows/docker-build.yml rename to .github/workflows/build-release.yml index 2ed8ace..61a1f11 100644 --- a/.github/workflows/docker-build.yml +++ b/.github/workflows/build-release.yml @@ -9,6 +9,8 @@ jobs: runs-on: ubuntu-latest steps: + - name: Checkout + uses: actions/checkout@v2 - name: Set up QEMU uses: docker/setup-qemu-action@v1 - name: Set up Docker buildx @@ -19,7 +21,9 @@ jobs: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Build and push image(s) - uses: docker/build-push-action@v1 + uses: docker/build-push-action@v2 with: push: true - tags: ${{ github.event.release.tag_name }} + context: . + platforms: linux/amd64 + tags: dbodky/dashing-icinga2:${{ github.event.release.tag_name }}