From 1865e9139299ee7bec9c8610af7b0e7df0d5f588 Mon Sep 17 00:00:00 2001 From: hotio Date: Sun, 3 Sep 2023 19:51:52 +0000 Subject: [PATCH] Updated some files [skip ci] --- .github/workflows/build.yml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b27ba5451..721d9fcea 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -295,6 +295,33 @@ jobs: docker manifest push ${IMAGE}:latest fi + tags: + runs-on: ubuntu-22.04 + needs: [build, publish] + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Git Config + env: + GITHUB_OWNER: ${{ github.repository_owner }} + run: | + git config --global user.email "${GITHUB_OWNER}@users.noreply.github.com" + git config --global user.name "${GITHUB_OWNER}" + + - name: Update TAGS.json + env: + VERSION: ${{ needs.build.outputs.version }} + BRANCH: ${{ needs.build.outputs.branch }} + run: | + TAGS="${GITHUB_REF//refs\/heads\//}${BRANCH},${GITHUB_REF//refs\/heads\//}${BRANCH}-${VERSION},${GITHUB_REF//refs\/heads\//}${BRANCH}-${GITHUB_SHA:0:7}" + LAST_UPDATED=$(date -u +'%FT%T.%3NZ') + jq -n --arg last_updated "${LAST_UPDATED}" --arg tags "${TAGS}" '{ last_updated: $last_updated, tags: $tags | split(",") }' > TAGS.json + git add . + if git commit -m "Update TAGS.json [skip ci]"; then + git push + fi + notify: runs-on: ubuntu-22.04 if: always()