Skip to content

Commit

Permalink
Add missing workflow dep for build-docker-image
Browse files Browse the repository at this point in the history
Add git workflow dispatch for manual building
  • Loading branch information
JamyGolden committed Jun 24, 2024
1 parent c8fa505 commit be98b59
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
15 changes: 10 additions & 5 deletions .github/workflows/push-ghcr-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@ on:
git_tag_name:
required: true
type: string
workflow_dispatch:
inputs:
git_tag_name:
description: Git version tag (eg. v0.9.0)
required: true

jobs:
push-image:
Expand All @@ -28,14 +33,14 @@ jobs:

- name: Tag Docker image
run: |
docker tag tinted-builder-rust ghcr.io/tinted-theming/tinted-builder-rust:${{ env.LATEST_TAG }}
docker tag ghcr.io/tinted-theming/tinted-builder-rust:${{ env.LATEST_TAG }} ghcr.io/tinted-theming/tinted-builder-rust:latest
docker tag tinted-builder-rust ghcr.io/tinted-theming/tinted-builder-rust:${{ inputs.git_tag_name }}
docker tag ghcr.io/tinted-theming/tinted-builder-rust:${{ inputs.git_tag_name }} ghcr.io/tinted-theming/tinted-builder-rust:latest
- name: Log in to GitHub Container Registry
run: echo ${{ secrets.DOCKER_GHCR }} | docker login ghcr.io -u tinted-theming-bot --password-stdin

- name: Push Docker image
run: docker push ghcr.io/tinted-theming/tinted-builder-rust:${{ env.LATEST_TAG }}
run: docker push ghcr.io/tinted-theming/tinted-builder-rust:${{ inputs.git_tag_name }}

- name: Remove existing 'latest' tag
run: |
Expand All @@ -46,6 +51,6 @@ jobs:
- name: Add 'latest' tag to LATEST_TAG commit
run: |
LATEST_TAG_COMMIT=$(git rev-list -n 1 ${{ inputs.git_tag_name }})
git tag latest ${LATEST_TAG_COMMIT}
git_tag_commit_hash=$(git rev-list -n 1 ${{ inputs.git_tag_name }})
git tag latest ${git_tag_commit_hash}
git push origin latest
4 changes: 3 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,9 @@ jobs:
checksum: sha256

build-docker-image:
needs: release
needs:
- setup-environment
- release
uses: ./.github/workflows/push-ghcr-image.yml
with:
git_tag_name: v${{ needs.setup-environment.outputs.git_tag_name }}
Expand Down

0 comments on commit be98b59

Please sign in to comment.