Skip to content

Commit

Permalink
hotfix starship-docker workflow to build starship specific containers
Browse files Browse the repository at this point in the history
  • Loading branch information
Anmol1696 committed Jun 18, 2024
1 parent c0ca630 commit db55722
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions .github/workflows/starship-docker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ on:
- "starship/exposer/**"
- "starship/faucet/**"
- ".github/workflows/starship-docker.yaml"
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-starship-docker
Expand Down Expand Up @@ -51,34 +52,34 @@ jobs:
with:
filters: |
src:
- '${{ matrix.type }}/**'
- 'starship/${{ matrix.type }}/**'
- name: Set up QEMU
if: steps.changes.outputs.src == 'true'
if: steps.changes.outputs.src == 'true' || github.event_name == 'workflow_dispatch'
uses: docker/setup-qemu-action@v2

- name: Set up Docker Buildx
if: steps.changes.outputs.src == 'true'
if: steps.changes.outputs.src == 'true' || github.event_name == 'workflow_dispatch'
uses: docker/setup-buildx-action@v2

- name: Login to Docker Hub
if: steps.changes.outputs.src == 'true'
if: steps.changes.outputs.src == 'true' || github.event_name == 'workflow_dispatch'
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Determine tag
if: steps.changes.outputs.src == 'true'
if: steps.changes.outputs.src == 'true' || github.event_name == 'workflow_dispatch'
id: docker-tag
run: |
tag=$(date -u "+%Y%m%d")-$(echo ${GITHUB_SHA} | cut -c1-7)
echo Tag will be $tag
echo ::set-output name=version::$tag
- name: Build and push
if: steps.changes.outputs.src == 'true'
if: steps.changes.outputs.src == 'true' || github.event_name == 'workflow_dispatch'
uses: docker/build-push-action@v4
with:
push: ${{ github.event_name == 'push' }}
Expand Down

0 comments on commit db55722

Please sign in to comment.