mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-07-16 04:11:49 -04:00
remove token_check, use github_token and add annotations to docker workflows
Signed-off-by: Simon Smith <simonsmith5521@gmail.com>
This commit is contained in:
parent
6f5f5325f8
commit
cd30e13ad7
19
.github/workflows/docker.yml
vendored
19
.github/workflows/docker.yml
vendored
@ -11,23 +11,9 @@ env:
|
||||
IMAGE_NAME: ${{ github.repository }}
|
||||
|
||||
jobs:
|
||||
check-token:
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
token_defined: ${{ steps.token_check.outputs.token_defined }}
|
||||
steps:
|
||||
- name: Check token
|
||||
id: token_check
|
||||
env:
|
||||
MY_TOKEN: ${{ secrets.MY_TOKEN }}
|
||||
if: "${{ env.MY_TOKEN != '' }}"
|
||||
run: echo "token_defined=true" >> "$GITHUB_OUTPUT"
|
||||
|
||||
build:
|
||||
name: Release
|
||||
runs-on: ubuntu-latest
|
||||
needs: [check-token]
|
||||
if: needs.check-token.outputs.token_defined == 'true'
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
@ -47,13 +33,15 @@ jobs:
|
||||
with:
|
||||
registry: ${{ env.REGISTRY }}
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.MY_TOKEN }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Extract metadata (tags, labels) for Docker
|
||||
id: meta
|
||||
uses: docker/metadata-action@v5
|
||||
with:
|
||||
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
||||
env:
|
||||
DOCKER_METADATA_ANNOTATIONS_LEVELS: manifest,index
|
||||
|
||||
- name: Build and push Docker image
|
||||
uses: docker/build-push-action@v6
|
||||
@ -64,6 +52,7 @@ jobs:
|
||||
push: true
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
annotations: ${{ steps.meta.outputs.annotations }}
|
||||
build-args: |
|
||||
INCLUDE_MONGODB_TOOLS=true
|
||||
INCLUDE_POSTGRESQL_TOOLS=true
|
||||
|
Loading…
x
Reference in New Issue
Block a user