From fc1a63805a6ceec39d8f392b21ebb6dfaa096141 Mon Sep 17 00:00:00 2001 From: Dustin Updyke <43444464+sei-dupdyke@users.noreply.github.com> Date: Fri, 12 Jan 2024 18:14:36 -0500 Subject: [PATCH] Update main.yml --- .github/workflows/main.yml | 37 ++++++++++++++++++++++++++----------- 1 file changed, 26 insertions(+), 11 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 4606a0df..a2557f15 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,4 +1,4 @@ -name: CI +name: Make API Container on: release: @@ -9,27 +9,42 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 + + # Extract tag name + - name: Extract tag name + id: tag_name + run: echo "##[set-output name=tag;]$(echo ${GITHUB_REF#refs/tags/})" + shell: bash + - name: Build and push Docker images - uses: docker/build-push-action@v1.1.0 + uses: docker/build-push-action@v2 # Updated to v2 with: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} repository: dustinupdyke/ghosts - tag_with_ref: true - push: ${{ startsWith(github.ref, 'refs/tags/') }} - path: src - dockerfile: src/Dockerfile-api + tags: dustinupdyke/ghosts:${{ steps.tag_name.outputs.tag }} + push: true + context: src + file: src/Dockerfile-api + buildcmusei: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 + + # Extract tag name + - name: Extract tag name + id: tag_name + run: echo "##[set-output name=tag;]$(echo ${GITHUB_REF#refs/tags/})" + shell: bash + - name: Build and push Docker images - uses: docker/build-push-action@v1.1.0 + uses: docker/build-push-action@v2 # Updated to v2 with: username: ${{ secrets.BOT_USERNAME }} password: ${{ secrets.BOT_PASSWORD }} repository: cmusei/ghosts - tag_with_ref: true - push: ${{ startsWith(github.ref, 'refs/tags/') }} - path: src - dockerfile: src/Dockerfile-api + tags: cmusei/ghosts:${{ steps.tag_name.outputs.tag }} + push: true + context: src + file: src/Dockerfile-api