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