mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-07-17 04:32:40 -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 }}
|
IMAGE_NAME: ${{ github.repository }}
|
||||||
|
|
||||||
jobs:
|
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:
|
build:
|
||||||
name: Release
|
name: Release
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: [check-token]
|
|
||||||
if: needs.check-token.outputs.token_defined == 'true'
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
@ -47,13 +33,15 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
registry: ${{ env.REGISTRY }}
|
registry: ${{ env.REGISTRY }}
|
||||||
username: ${{ github.actor }}
|
username: ${{ github.actor }}
|
||||||
password: ${{ secrets.MY_TOKEN }}
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
- name: Extract metadata (tags, labels) for Docker
|
- name: Extract metadata (tags, labels) for Docker
|
||||||
id: meta
|
id: meta
|
||||||
uses: docker/metadata-action@v5
|
uses: docker/metadata-action@v5
|
||||||
with:
|
with:
|
||||||
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
||||||
|
env:
|
||||||
|
DOCKER_METADATA_ANNOTATIONS_LEVELS: manifest,index
|
||||||
|
|
||||||
- name: Build and push Docker image
|
- name: Build and push Docker image
|
||||||
uses: docker/build-push-action@v6
|
uses: docker/build-push-action@v6
|
||||||
@ -64,6 +52,7 @@ jobs:
|
|||||||
push: true
|
push: true
|
||||||
tags: ${{ steps.meta.outputs.tags }}
|
tags: ${{ steps.meta.outputs.tags }}
|
||||||
labels: ${{ steps.meta.outputs.labels }}
|
labels: ${{ steps.meta.outputs.labels }}
|
||||||
|
annotations: ${{ steps.meta.outputs.annotations }}
|
||||||
build-args: |
|
build-args: |
|
||||||
INCLUDE_MONGODB_TOOLS=true
|
INCLUDE_MONGODB_TOOLS=true
|
||||||
INCLUDE_POSTGRESQL_TOOLS=true
|
INCLUDE_POSTGRESQL_TOOLS=true
|
||||||
|
Loading…
x
Reference in New Issue
Block a user