Use explicit Gitea revision variables
Publish image, chart, and GitOps promotion / Test and publish immutable artifacts (push) Failing after 50s
Publish image, chart, and GitOps promotion / Test and publish immutable artifacts (push) Failing after 50s
This commit is contained in:
@@ -40,14 +40,17 @@ jobs:
|
||||
|
||||
- name: Build and push image
|
||||
if: gitea.ref == 'refs/heads/main' || startsWith(gitea.ref, 'refs/tags/v')
|
||||
env:
|
||||
COMMIT_SHA: ${{ gitea.sha }}
|
||||
GIT_REF: ${{ gitea.ref }}
|
||||
run: |
|
||||
docker build --load \
|
||||
--label "org.opencontainers.image.revision=${GITEA_SHA}" \
|
||||
--label "org.opencontainers.image.revision=${COMMIT_SHA}" \
|
||||
--label "org.opencontainers.image.source=https://code.brunner.ninja/feedc0de/immich-sync" \
|
||||
--tag "${IMAGE}:${GITEA_SHA}" .
|
||||
docker push "${IMAGE}:${GITEA_SHA}"
|
||||
if [ "${GITEA_REF}" = refs/heads/main ]; then
|
||||
docker tag "${IMAGE}:${GITEA_SHA}" "${IMAGE}:latest"
|
||||
--tag "${IMAGE}:${COMMIT_SHA}" .
|
||||
docker push "${IMAGE}:${COMMIT_SHA}"
|
||||
if [ "${GIT_REF}" = refs/heads/main ]; then
|
||||
docker tag "${IMAGE}:${COMMIT_SHA}" "${IMAGE}:latest"
|
||||
docker push "${IMAGE}:latest"
|
||||
fi
|
||||
|
||||
@@ -55,10 +58,11 @@ jobs:
|
||||
if: gitea.ref == 'refs/heads/main' || startsWith(gitea.ref, 'refs/tags/v')
|
||||
env:
|
||||
CHART_VERSION: ${{ steps.version.outputs.version }}
|
||||
COMMIT_SHA: ${{ gitea.sha }}
|
||||
run: |
|
||||
mkdir -p dist
|
||||
helm package chart --destination dist \
|
||||
--version "${CHART_VERSION}" --app-version "${GITEA_SHA}"
|
||||
--version "${CHART_VERSION}" --app-version "${COMMIT_SHA}"
|
||||
curl --fail-with-body --user "${{ secrets.PACKAGE_USERNAME }}:${{ secrets.PACKAGE_TOKEN }}" \
|
||||
--request POST \
|
||||
--upload-file "dist/immich-sync-${CHART_VERSION}.tgz" \
|
||||
@@ -66,9 +70,11 @@ jobs:
|
||||
|
||||
- name: Check that this is still current main
|
||||
if: gitea.ref == 'refs/heads/main'
|
||||
env:
|
||||
COMMIT_SHA: ${{ gitea.sha }}
|
||||
run: |
|
||||
git fetch --no-tags origin main
|
||||
test "$(git rev-parse FETCH_HEAD)" = "${GITEA_SHA}"
|
||||
test "$(git rev-parse FETCH_HEAD)" = "${COMMIT_SHA}"
|
||||
|
||||
- name: Check out GitOps repository
|
||||
if: gitea.ref == 'refs/heads/main'
|
||||
|
||||
Reference in New Issue
Block a user