From f96c5e9a4608877581c1311ef70de529473c1ba9 Mon Sep 17 00:00:00 2001 From: binhex Date: Sat, 30 Jan 2021 15:00:30 +0000 Subject: [PATCH] switch filename for workflow, add in test workflow --- .../docker-manual-triggered-test.yml | 50 +++++++++++++++++++ ...cker.yml => docker-tag-triggered-prod.yml} | 0 2 files changed, 50 insertions(+) create mode 100644 .github/workflows/docker-manual-triggered-test.yml rename .github/workflows/{docker.yml => docker-tag-triggered-prod.yml} (100%) diff --git a/.github/workflows/docker-manual-triggered-test.yml b/.github/workflows/docker-manual-triggered-test.yml new file mode 100644 index 0000000..1695a61 --- /dev/null +++ b/.github/workflows/docker-manual-triggered-test.yml @@ -0,0 +1,50 @@ +name: docker-manual-triggered-test + +on: + workflow_dispatch: + inputs: + tags: + description: 'Enter tag name for test/dev image' + default: 'test' + +jobs: + gcr-dockerhub-build-publish: + 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: Login to GitHub Container Registry + uses: docker/login-action@v1 + with: + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ secrets.CR_PAT }} + - + name: Show Runners environment (debug) + shell: bash + run: export + - + name: Build and Push to GCR and Docker Hub + uses: docker/build-push-action@v2 + with: + context: . + file: ./Dockerfile + platforms: linux/amd64 + push: true + tags: | + ${{ github.repository }}:${{ github.event.inputs.tags }} + ghcr.io/${{ github.repository }}:${{ github.event.inputs.tags }} diff --git a/.github/workflows/docker.yml b/.github/workflows/docker-tag-triggered-prod.yml similarity index 100% rename from .github/workflows/docker.yml rename to .github/workflows/docker-tag-triggered-prod.yml