@@ -10,29 +10,29 @@ jobs:
1010 runs-on : ubuntu-latest
1111 permissions :
1212 contents : read
13- packages : write
13+ id-token : write
1414
1515 steps :
1616 - name : Checkout repository
17- uses : actions/checkout@v4
18- - name : Retrieve tag name (tag)
19- run : |
20- echo TAG_NAME=$(echo $GITHUB_REF | sed -e "s|refs/tags/||") >> $GITHUB_ENV
21- - name : Log in to GHCR
22- uses : docker/login-action@v3
17+ uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
18+
19+ - name : " Read vault secrets"
20+ uses : rancher-eio/read-vault-secrets@main
2321 with :
24- registry : ghcr.io
25- username : ${{ github.actor }}
26- password : ${{ secrets.GITHUB_TOKEN }}
27- - name : Set up QEMU
28- uses : docker/setup-qemu-action@v3
29- - name : Set up Docker Buildx
30- uses : docker/setup-buildx-action@v3
31- - name : Build and push Docker image
32- uses : docker/build-push-action@v5
22+ secrets : |
23+ secret/data/github/repo/${{ github.repository }}/rancher-prime-stg-registry/credentials registry | STAGING_PRIME_REGISTRY ;
24+ secret/data/github/repo/${{ github.repository }}/rancher-prime-stg-registry/credentials username | STAGING_PRIME_REGISTRY_USERNAME ;
25+ secret/data/github/repo/${{ github.repository }}/rancher-prime-stg-registry/credentials password | STAGING_PRIME_REGISTRY_PASSWORD ;
26+
27+ # This encapsulates: login, qemu, build/push
28+ - name : Build and push image
29+ uses : rancher/ecm-distro-tools/actions/publish-image@master
3330 with :
34- context : .
35- platforms : linux/amd64,linux/arm64
36- push : true
37- file : package/Dockerfile
38- tags : ghcr.io/${{ github.repository }}:${{ env.TAG_NAME }}
31+ image : rancher-ai-agent
32+ tag : ${{ github.ref_name }}
33+ push-to-prime : true
34+ push-to-public : false
35+ prime-registry : ${{ env.STAGING_PRIME_REGISTRY }}
36+ prime-repo : rancher
37+ prime-username : ${{ env.STAGING_PRIME_REGISTRY_USERNAME }}
38+ prime-password : ${{ env.STAGING_PRIME_REGISTRY_PASSWORD }}
0 commit comments