remove token_check, use github_token and add annotations to docker workflows

Signed-off-by: Simon Smith <simonsmith5521@gmail.com>

Simon Smith committed Jun 3, 2025 at 20:22 UTC cd30e13ad79912313fbe2c6b6dbe64e60231d2d4
1 file changed +4 -15
.github/workflows/docker.yml
+4 -15
@@ -11,23 +11,9 @@ env:
11 IMAGE_NAME: ${{ github.repository }}
12
13 jobs:
14 - check-token:
15 - runs-on: ubuntu-latest
16 - outputs:
17 - token_defined: ${{ steps.token_check.outputs.token_defined }}
18 - steps:
19 - - name: Check token
20 - id: token_check
21 - env:
22 - MY_TOKEN: ${{ secrets.MY_TOKEN }}
23 - if: "${{ env.MY_TOKEN != '' }}"
24 - run: echo "token_defined=true" >> "$GITHUB_OUTPUT"
25 -
14 build:
15 name: Release
16 runs-on: ubuntu-latest
29 - needs: [check-token]
30 - if: needs.check-token.outputs.token_defined == 'true'
17 steps:
18 - name: Checkout
19 uses: actions/checkout@v4
@@ -47,13 +33,15 @@ jobs:
33 with:
34 registry: ${{ env.REGISTRY }}
35 username: ${{ github.actor }}
50 - password: ${{ secrets.MY_TOKEN }}
36 + password: ${{ secrets.GITHUB_TOKEN }}
37
38 - name: Extract metadata (tags, labels) for Docker
39 id: meta
40 uses: docker/metadata-action@v5
41 with:
42 images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
43 + env:
44 + DOCKER_METADATA_ANNOTATIONS_LEVELS: manifest,index
45
46 - name: Build and push Docker image
47 uses: docker/build-push-action@v6
@@ -64,6 +52,7 @@ jobs:
52 push: true
53 tags: ${{ steps.meta.outputs.tags }}
54 labels: ${{ steps.meta.outputs.labels }}
55 + annotations: ${{ steps.meta.outputs.annotations }}
56 build-args: |
57 INCLUDE_MONGODB_TOOLS=true
58 INCLUDE_POSTGRESQL_TOOLS=true