ci: align CD workflow names and image tags
This commit is contained in:
1 parent
2a063481a6
commit
0c605c4dfb
2 files changed
+16
-15
No files matched your search
@@ -30,7 +30,7 @@ jobs:
|
||||
run: |
|
||||
runs_url="$GITEA_API_URL/repos/$GITEA_REPOSITORY/actions/runs?limit=100"
|
||||
runs="$(curl --fail --silent --show-error --header "Authorization: token $GITEA_TOKEN" "$runs_url")"
|
||||
previous_sha="$(jq -r --arg path '.gitea/workflows/ReleaseDevelopment.yml' '[.workflow_runs[] | select(.path == $path and .status == "success")][0].head_sha // empty' <<< "$runs")"
|
||||
previous_sha="$(jq -r --arg path '.gitea/workflows/CD Development.yml' '[.workflow_runs[] | select(.path == $path and .status == "success")][0].head_sha // empty' <<< "$runs")"
|
||||
|
||||
if [ "$previous_sha" = "$GITEA_SHA" ]; then
|
||||
echo 'changed=false' >> "$GITEA_OUTPUT"
|
||||
@@ -52,11 +52,10 @@ jobs:
|
||||
uses: docker/setup-buildx-action@v4.4.1
|
||||
|
||||
- name: Log in to registry
|
||||
uses: docker/login-action@v4.6.0
|
||||
with:
|
||||
registry: ${{ env.REGISTRY }}
|
||||
username: ${{ secrets.DOCKER_REGISTRY_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_REGISTRY_PASSWORD }}
|
||||
env:
|
||||
REGISTRY_USERNAME: ${{ secrets.DOCKER_REGISTRY_USERNAME }}
|
||||
REGISTRY_PASSWORD: ${{ secrets.DOCKER_REGISTRY_PASSWORD }}
|
||||
run: printf '%s' "$REGISTRY_PASSWORD" | docker login "$REGISTRY" --username "$REGISTRY_USERNAME" --password-stdin
|
||||
|
||||
- name: Build and push development image
|
||||
uses: docker/build-push-action@v7.4.0
|
||||
@@ -67,9 +66,10 @@ jobs:
|
||||
build-args: |
|
||||
APP_VERSION=${{ gitea.sha }}
|
||||
VCS_REF=${{ gitea.sha }}
|
||||
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:dev
|
||||
tags: |
|
||||
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:development
|
||||
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:PreRelease
|
||||
labels: |
|
||||
org.opencontainers.image.version=${{ gitea.sha }}
|
||||
org.opencontainers.image.revision=${{ gitea.sha }}
|
||||
org.opencontainers.image.source=${{ gitea.repositoryUrl }}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
name: CD Production
|
||||
name: CD Production
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
@@ -21,11 +21,10 @@ jobs:
|
||||
uses: docker/setup-buildx-action@v4.4.1
|
||||
|
||||
- name: Log in to registry
|
||||
uses: docker/login-action@v4.6.0
|
||||
with:
|
||||
registry: ${{ env.REGISTRY }}
|
||||
username: ${{ secrets.DOCKER_REGISTRY_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_REGISTRY_PASSWORD }}
|
||||
env:
|
||||
REGISTRY_USERNAME: ${{ secrets.DOCKER_REGISTRY_USERNAME }}
|
||||
REGISTRY_PASSWORD: ${{ secrets.DOCKER_REGISTRY_PASSWORD }}
|
||||
run: printf '%s' "$REGISTRY_PASSWORD" | docker login "$REGISTRY" --username "$REGISTRY_USERNAME" --password-stdin
|
||||
|
||||
- name: Build and push production image
|
||||
uses: docker/build-push-action@v7.4.0
|
||||
@@ -36,7 +35,9 @@ jobs:
|
||||
build-args: |
|
||||
APP_VERSION=${{ gitea.sha }}
|
||||
VCS_REF=${{ gitea.sha }}
|
||||
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest
|
||||
tags: |
|
||||
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest
|
||||
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:Release
|
||||
labels: |
|
||||
org.opencontainers.image.version=${{ gitea.sha }}
|
||||
org.opencontainers.image.revision=${{ gitea.sha }}
|
||||
Reference in new issue
Block a user