diff --git a/.github/workflows/build-dev-image.yml b/.github/workflows/build-dev-image.yml index 7b510c7..4da67ba 100644 --- a/.github/workflows/build-dev-image.yml +++ b/.github/workflows/build-dev-image.yml @@ -1,6 +1,7 @@ name: Build & Push Jira Development Docker Image to GHCR on: + workflow_dispatch: pull_request: branches: - develop @@ -10,7 +11,7 @@ on: env: REGISTRY: ghcr.io - IMAGE_NAME: slickdeals/jira-software + IMAGE_NAME: slickdeals/jira-software-dev COMMIT_SHA: ${{ github.sha }} jobs: @@ -28,24 +29,20 @@ jobs: with: registry: ghcr.io username: ${{ github.actor }} - password: ${{ env.GITHUB_TOKEN }} - env: - GITHUB_USER: ${{ github.actor }} - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + password: ${{ secrets.GITHUB_TOKEN }} - name: Extract metadata for the Docker image id: meta uses: docker/metadata-action@v5 with: images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} - tags: | - ${{ env.COMMIT_SHA }} - ${{ vars.DEVELOP_TAG}} - name: Build, Tag, and push Docker image uses: docker/build-push-action@v5 with: context: ./app push: ${{ github.event_name != 'pull_request' }} - tags: ${{ env.COMMIT_SHA }} + tags: | + ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.COMMIT_SHA}} + ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest labels: ${{ steps.meta.outputs.labels }} build-args: | - BUILD_TAG=${{ vars.DEVELOP_TAG }} \ No newline at end of file + BUILD_TAG=${{ vars.DEVELOP_TAG }}