From cfb9cd72beb26ea3c7cda2ae1acd39e44a76cc82 Mon Sep 17 00:00:00 2001 From: Jan-Rudolph Buhrmann Date: Tue, 7 May 2024 12:39:02 +0200 Subject: [PATCH] Create docker push action for main branch --- .github/workflows/{main.yml => develop.yml} | 4 +-- .github/workflows/production.yml | 30 +++++++++++++++++++++ 2 files changed, 32 insertions(+), 2 deletions(-) rename .github/workflows/{main.yml => develop.yml} (96%) create mode 100644 .github/workflows/production.yml diff --git a/.github/workflows/main.yml b/.github/workflows/develop.yml similarity index 96% rename from .github/workflows/main.yml rename to .github/workflows/develop.yml index a1d1eeeb..b9f97e5d 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/develop.yml @@ -1,5 +1,5 @@ # https://docs.docker.com/build/ci/github-actions/push-multi-registries/ -name: docker_push +name: docker_push_deploy_test on: workflow_dispatch: @@ -8,7 +8,7 @@ on: - "develop" jobs: - docker: + deploy_test: runs-on: ubuntu-latest steps: - name: Checkout diff --git a/.github/workflows/production.yml b/.github/workflows/production.yml new file mode 100644 index 00000000..f1035361 --- /dev/null +++ b/.github/workflows/production.yml @@ -0,0 +1,30 @@ +# https://docs.docker.com/build/ci/github-actions/push-multi-registries/ +name: docker_push_prod + +on: + push: + tags: + - v** + +jobs: + docker_push: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - name: Login to SADiLaR Container Registry + uses: docker/login-action@v3 + with: + registry: docker.sadilar.org + username: ${{ vars.SADILAR_DOCKER_REPOSITORY_USER }} + password: ${{ secrets.SADILAR_DOCKER_REPOSITORY_SECRET }} + - name: Build and push + uses: docker/build-push-action@v5 + with: + context: . + platforms: linux/amd64 + push: true + tags: | + docker.sadilar.org/term_platform:${{ github.ref_name }}