11---
22name : " Release k6-operator"
3+ permissions : {}
34
45on :
56 workflow_dispatch :
@@ -18,30 +19,39 @@ jobs:
1819 steps :
1920 - name : " Build:checkout"
2021 uses : actions/checkout@v4
22+ with :
23+ persist-credentials : false
2124 - name : " Set image tag name"
25+ env :
26+ GH_IMAGE_TAG : ${{ github.event.inputs.image_tag }}
27+ GH_TAG_NAME : ${{ github.event.release.tag_name }}
2228 run : |
2329 if [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then
24- echo "IMAGETAG=${{ github.event.inputs.image_tag } }" >> $GITHUB_ENV
30+ echo "IMAGETAG=${GH_IMAGE_TAG }" >> $GITHUB_ENV
2531 else
26- echo "IMAGETAG=${{ github.event.release.tag_name } }" >> $GITHUB_ENV
32+ echo "IMAGETAG=${GH_TAG_NAME }" >> $GITHUB_ENV
2733 fi
2834 - name : " Check image tag name"
2935 run : |
3036 echo "IMAGETAG=${{env.IMAGETAG}}"
3137 - name : Set up QEMU
32- uses : docker/setup-qemu-action@v3
38+ # this is v3.6.0
39+ uses : docker/setup-qemu-action@29109295f81e9208d7d86ff1c6c12d2833863392
3340 - name : " Build:buildx"
34- uses : docker/setup-buildx-action@v3
41+ # this is v3.10.0
42+ uses : docker/setup-buildx-action@29109295f81e9208d7d86ff1c6c12d2833863392
3543 with :
3644 version : v0.9.1 # Buildx version
3745 - name : " Build:login"
38- uses : docker/login-action@v3
46+ # this is v3.4.0
47+ uses : docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772
3948 with :
4049 registry : ghcr.io
4150 username : ${{ github.actor }}
4251 password : ${{ secrets.GITHUB_TOKEN }}
4352 - name : " Build:dockerimage"
44- uses : docker/build-push-action@v5
53+ # this is v6.16.0
54+ uses : docker/build-push-action@14487ce63c7a62a4a324b0bfb37086795e31c6c1
4555 with :
4656 context : .
4757 push : true
@@ -51,15 +61,17 @@ jobs:
5161 platforms : linux/amd64,linux/arm64
5262 tags : ghcr.io/grafana/k6-operator:latest,ghcr.io/grafana/k6-operator:controller-${{env.IMAGETAG}}
5363 - name : " Build:dockerimage"
54- uses : docker/build-push-action@v5
64+ # this is v6.16.0
65+ uses : docker/build-push-action@14487ce63c7a62a4a324b0bfb37086795e31c6c1
5566 with :
5667 context : .
5768 push : true
5869 file : Dockerfile.runner
5970 platforms : linux/amd64,linux/arm64
6071 tags : ghcr.io/grafana/k6-operator:latest-runner,ghcr.io/grafana/k6-operator:runner-${{env.IMAGETAG}}
6172 - name : " Build:dockerimage"
62- uses : docker/build-push-action@v5
73+ # this is v6.16.0
74+ uses : docker/build-push-action@14487ce63c7a62a4a324b0bfb37086795e31c6c1
6375 with :
6476 context : .
6577 push : true
@@ -77,15 +89,21 @@ jobs:
7789 steps :
7890 - name : " Checkout code"
7991 uses : actions/checkout@v4
92+ with :
93+ persist-credentials : true # this job is opening a PR in the next steps
8094 - name : " Set image tag name"
95+ env :
96+ GH_IMAGE_TAG : ${{ github.event.inputs.image_tag }}
97+ GH_TAG_NAME : ${{ github.event.release.tag_name }}
8198 run : |
8299 if [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then
83- echo "IMAGETAG=${{ github.event.inputs.image_tag } }" >> $GITHUB_ENV
100+ echo "IMAGETAG=${GH_IMAGE_TAG }" >> $GITHUB_ENV
84101 else
85- echo "IMAGETAG=${{ github.event.release.tag_name } }" >> $GITHUB_ENV
102+ echo "IMAGETAG=${GH_TAG_NAME }" >> $GITHUB_ENV
86103 fi
87104 - name : " Setup kustomize"
88- uses : imranismail/setup-kustomize@v2
105+ # this is v2.1.0
106+ uses : imranismail/setup-kustomize@2ba527d4d055ab63514ba50a99456fc35684947f
89107 - name : " Bundle"
90108 run : |
91109 cd config/default && kustomize edit set image ghcr.io/grafana/k6-operator=*:controller-${{env.IMAGETAG}} && kustomize build . > ../../bundle.yaml
0 commit comments