From 7c8ac75dc0693815aa2e0897fd9548d702f0efbe Mon Sep 17 00:00:00 2001 From: Kevin Price <39307688+kevinpricethesecond@users.noreply.github.com> Date: Thu, 23 Mar 2023 15:50:06 -0500 Subject: [PATCH 1/5] Update auto_build.yml --- .github/workflows/auto_build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/auto_build.yml b/.github/workflows/auto_build.yml index 2b609ab..6f98d26 100644 --- a/.github/workflows/auto_build.yml +++ b/.github/workflows/auto_build.yml @@ -34,7 +34,7 @@ jobs: # if tag == prod release, tag as latest - name: Build the Docker image with latest tag if: ${{ steps.extract_branch.outputs.branch == 'prod' }} - run: docker build . --file Dockerfile --tag tapis/globus-proxy:latest --tag tapis/globus-proxy:1.2.0 + run: docker build . --file Dockerfile --tag tapis/globus-proxy:latest --tag tapis/globus-proxy:1.3.0 - name: Push the image to dockerhub run: docker push --all-tags tapis/globus-proxy From 1d46ef6e79c98b35b02fb84da893536bd8157819 Mon Sep 17 00:00:00 2001 From: kevinpricethesecond Date: Thu, 11 Jul 2024 08:53:27 -0500 Subject: [PATCH 2/5] initial testing --- .github/workflows/release.yml | 42 +++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..7c0dddd --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,42 @@ +name: Docker Image CI + +on: + release: + types: [published] + +jobs: + + build: + + runs-on: ubuntu-latest + + steps: + + - name: Extract branch name + shell: bash + run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})" + id: extract_branch + + - name: Debug release name + shell: bash + run: echo ${{ steps.extract_branch.outputs.branch }} + + # - name: Checkout + # uses: actions/checkout@v3 + + # - name: Login to Docker Hub + # uses: docker/login-action@v1 + # with: + # username: ${{ secrets.DOCKER_HUB_USERNAME }} + # password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} + + # - name: Build the Docker image + # run: docker build . --file Dockerfile --tag tapis/globus-proxy:${{ steps.extract_branch.outputs.branch }} + + # # if tag == prod release, tag as latest + # - name: Build the Docker image with latest tag + # if: ${{ steps.extract_branch.outputs.branch == 'prod' }} + # run: docker build . --file Dockerfile --tag tapis/globus-proxy:latest --tag tapis/globus-proxy:1.3.0 + + # - name: Push the image to dockerhub + # run: docker push --all-tags tapis/globus-proxy From 24e9fd2278589474cc505dc1afa30b41ab0a0d25 Mon Sep 17 00:00:00 2001 From: kevinpricethesecond Date: Thu, 11 Jul 2024 09:01:01 -0500 Subject: [PATCH 3/5] use builtin instead of output --- .github/workflows/release.yml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7c0dddd..a36a48e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -12,14 +12,15 @@ jobs: steps: - - name: Extract branch name - shell: bash - run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})" - id: extract_branch + # - name: Extract branch name + # shell: bash + # # run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})" + # run: echo "{name}={branch}" >> $GITHUB_OUTPUT + # id: extract_branch - name: Debug release name shell: bash - run: echo ${{ steps.extract_branch.outputs.branch }} + run: echo ${{ github.ref_name }} # - name: Checkout # uses: actions/checkout@v3 From eaf32ec192d9a7db88e95ac3fda2a014e341a393 Mon Sep 17 00:00:00 2001 From: kevinpricethesecond Date: Thu, 11 Jul 2024 09:03:18 -0500 Subject: [PATCH 4/5] full automation --- .github/workflows/release.yml | 34 +++++++++++----------------------- 1 file changed, 11 insertions(+), 23 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a36a48e..f856040 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -11,33 +11,21 @@ jobs: runs-on: ubuntu-latest steps: - - # - name: Extract branch name - # shell: bash - # # run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})" - # run: echo "{name}={branch}" >> $GITHUB_OUTPUT - # id: extract_branch - - name: Debug release name shell: bash run: echo ${{ github.ref_name }} - # - name: Checkout - # uses: actions/checkout@v3 + - name: Checkout + uses: actions/checkout@v3 - # - name: Login to Docker Hub - # uses: docker/login-action@v1 - # with: - # username: ${{ secrets.DOCKER_HUB_USERNAME }} - # password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} + - name: Login to Docker Hub + uses: docker/login-action@v1 + with: + username: ${{ secrets.DOCKER_HUB_USERNAME }} + password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} - # - name: Build the Docker image - # run: docker build . --file Dockerfile --tag tapis/globus-proxy:${{ steps.extract_branch.outputs.branch }} - - # # if tag == prod release, tag as latest - # - name: Build the Docker image with latest tag - # if: ${{ steps.extract_branch.outputs.branch == 'prod' }} - # run: docker build . --file Dockerfile --tag tapis/globus-proxy:latest --tag tapis/globus-proxy:1.3.0 + - name: Build the Docker image + run: docker build . --file Dockerfile --tag tapis/globus-proxy:${{ github.ref_name }} - # - name: Push the image to dockerhub - # run: docker push --all-tags tapis/globus-proxy + - name: Push the image to dockerhub + run: docker push --all-tags tapis/globus-proxy From 2a658ffb7b3a5a950cc1c1b3709fd017772d2d1a Mon Sep 17 00:00:00 2001 From: kevinpricethesecond Date: Thu, 11 Jul 2024 09:13:03 -0500 Subject: [PATCH 5/5] remove release tagging from auto_build --- .github/workflows/auto_build.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.github/workflows/auto_build.yml b/.github/workflows/auto_build.yml index 6f98d26..d2e5afb 100644 --- a/.github/workflows/auto_build.yml +++ b/.github/workflows/auto_build.yml @@ -30,11 +30,6 @@ jobs: - name: Build the Docker image run: docker build . --file Dockerfile --tag tapis/globus-proxy:${{ steps.extract_branch.outputs.branch }} - - # if tag == prod release, tag as latest - - name: Build the Docker image with latest tag - if: ${{ steps.extract_branch.outputs.branch == 'prod' }} - run: docker build . --file Dockerfile --tag tapis/globus-proxy:latest --tag tapis/globus-proxy:1.3.0 - name: Push the image to dockerhub run: docker push --all-tags tapis/globus-proxy