Skip to content

Commit aa27db7

Browse files
committed
ci: fix tag name not formatted right once again
1 parent d8d4659 commit aa27db7

File tree

1 file changed

+7
-15
lines changed

1 file changed

+7
-15
lines changed

.github/workflows/package.yml

Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -27,41 +27,33 @@ jobs:
2727
token: ${{ secrets.TOKEN }}
2828

2929
- name: Log in to the Container registry
30-
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
30+
uses: docker/login-action@v4
3131
with:
3232
registry: ${{ env.REGISTRY }}
3333
username: ${{ github.actor }}
3434
password: ${{ secrets.GITHUB_TOKEN }}
35-
- name: Extract metadata (tags, labels) for Docker
36-
id: meta
37-
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
38-
with:
39-
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
4035
- name: Build and push Docker image
4136
id: push
42-
uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4
37+
uses: docker/build-push-action@v7
4338
with:
4439
context: .
4540
push: true
46-
tags: ${{ steps.meta.outputs.tags }}
47-
labels: ${{ steps.meta.outputs.labels }}
41+
tags: |
42+
${{ env.REGISTRY }}/nanoforge-dev/docs:latest
43+
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.sha }}
4844
- name: install yq and setup git
4945
run: |
5046
pip install yq
5147
5248
git config --global user.name "github-actions[bot]"
5349
git config --global user.email "username@users.noreply.github.com"
54-
- name: fix tag format
55-
id: tag
56-
run: |
57-
echo "sha=$(echo "${{ steps.push.outputs.digest }}" | sed 's/sha256:/sha256-/g')" >> $GITHUB_OUTPUT
5850
- name: Update tag in values.yaml
5951
run: |
6052
61-
python -m yq -Y --indentless --in-place '.image.tag = "${{ steps.tag.outputs.sha }}"' values.yml
53+
python -m yq -Y --indentless --in-place '.image.tag = "${{ github.sha }}"' values.yml
6254
6355
git add values.yml
64-
git commit -m "Update image tag to ${{ steps.tag.outputs.sha }}"
56+
git commit -m "Update image tag to ${{ github.sha }}"
6557
git push origin main
6658
6759
- name: Generate artifact attestation

0 commit comments

Comments
 (0)