Skip to content

Commit

Permalink
ci: use short hash
Browse files Browse the repository at this point in the history
  • Loading branch information
jef authored and sentriz committed May 11, 2021
1 parent 5a61fb4 commit d2c9136
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/nightly-release.yaml
Expand Up @@ -48,6 +48,10 @@ jobs:
run: echo ${{ secrets.DOCKERHUB_TOKEN }} | docker login -u ${{ secrets.DOCKERHUB_USERNAME }} --password-stdin
- name: Login into GitHub Container Registry
run: echo ${{ secrets.CR_PAT }} | docker login ghcr.io -u ${{ github.actor }} --password-stdin
- name: Generate short hash
run: |
_short_hash=${{ github.sha }}
echo "SHORT_HASH=${_short_hash:7}" >> $GITHUB_ENV
- name: Build and Push
uses: docker/build-push-action@v2
with:
Expand All @@ -56,7 +60,7 @@ jobs:
platforms: linux/amd64,linux/arm64,linux/arm/v7
push: true
tags: |
ghcr.io/${{ github.repository }}:${{ github.sha }}
ghcr.io/${{ github.repository }}:${{ env.SHORT_HASH }}
ghcr.io/${{ github.repository }}:nightly
${{ github.repository }}:${{ github.sha }}
${{ github.repository }}:${{ env.SHORT_HASH }}
${{ github.repository }}:nightly

0 comments on commit d2c9136

Please sign in to comment.