@@ -14,7 +14,7 @@ concurrency:
1414jobs :
1515 build :
1616 if : ${{ github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'preview') }}
17- runs-on : ubuntu-latest
17+ runs-on : blacksmith-4vcpu- ubuntu-2404
1818
1919 permissions :
2020 contents : read
2323 steps :
2424 - name : Docker meta
2525 id : meta
26- uses : docker/metadata-action@v5.0.0
26+ uses : docker/metadata-action@96383f45573cb7f253c731d3b3ab81c87ef81934 # v5.0.0
2727 env :
2828 DOCKER_METADATA_PR_HEAD_SHA : true
2929 with :
@@ -34,25 +34,23 @@ jobs:
3434 type=ref,event=tag
3535 type=sha
3636
37- - name : Set up Docker Buildx
38- uses : docker /setup-buildx-action@v3
37+ - name : Setup Blacksmith Builder
38+ uses : useblacksmith /setup-docker-builder@5241b2e9423e8b1fa37ed6050ecb62d0fb9a4e38 # v1.6.0
3939
4040 - name : Login to GitHub Container Registry
41- uses : docker/login-action@v3
41+ uses : docker/login-action@4907a6ddec9925e35a0a9e82d7399ccc52663121 # v4.1.0
4242 with :
4343 registry : ghcr.io
4444 username : ${{ github.actor }}
4545 password : ${{ secrets.GITHUB_TOKEN }}
4646
4747 - name : Build and push
4848 id : docker_build
49- uses : docker /build-push-action@v6
49+ uses : useblacksmith /build-push-action@30c71162f16ea2c27c3e21523255d209b8b538c1 # v2
5050 with :
5151 push : true
5252 tags : ${{ steps.meta.outputs.tags }}
5353 labels : ${{ steps.meta.outputs.labels }}
54- cache-from : type=gha
55- cache-to : type=gha,mode=max
5654 build-args : |
5755 MIX_ENV=prod
5856 BUILD_METADATA=${{ steps.meta.outputs.json }}
6260
6361 - name : Notify team on failure
6462 if : ${{ failure() && github.ref == 'refs/heads/master' }}
65- uses : fjogeleit/http-request-action@v1
63+ uses : fjogeleit/http-request-action@551353b829c3646756b2ec2b3694f819d7957495 # v2.0.0
6664 with :
6765 url : ${{ secrets.BUILD_NOTIFICATION_URL }}
6866 method : ' POST'
@@ -72,17 +70,19 @@ jobs:
7270 - name : Get first line and Co-Authored-By lines of the commit message
7371 if : ${{ success() && github.ref == 'refs/heads/master' }}
7472 id : commitmsg
73+ env :
74+ COMMIT_MSG : ${{ github.event.head_commit.message }}
7575 run : |
76- first_line=$(echo "${{ github.event.head_commit.message }} " | head -n1)
77- co_authors=$(echo "${{ github.event.head_commit.message }} " | grep -h 'Co-authored-by:' | sort -u | cut -d: -f2- | paste -sd, -)
76+ first_line=$(printf '%s\n' "$COMMIT_MSG " | head -n1 | xargs )
77+ co_authors=$(printf '%s\n' "$COMMIT_MSG " | grep -h 'Co-authored-by:' | sort -u | cut -d: -f2- | paste -sd, - | xargs )
7878 {
7979 echo "first_line=$first_line"
8080 echo "co_authors=$co_authors"
8181 } >> $GITHUB_OUTPUT
8282
8383 - name : Notify team on success
8484 if : ${{ success() && github.ref == 'refs/heads/master' }}
85- uses : fjogeleit/http-request-action@v1
85+ uses : fjogeleit/http-request-action@551353b829c3646756b2ec2b3694f819d7957495 # v2.0.0
8686 with :
8787 url : ${{ secrets.BUILD_NOTIFICATION_URL }}
8888 method : ' POST'
0 commit comments