From 8abc31c4ae79a56940b227edc8e5bfe05d67c227 Mon Sep 17 00:00:00 2001 From: Nicholas Wiltsie Date: Thu, 15 Aug 2024 13:39:00 -0700 Subject: [PATCH] Update tool-Docker-action to v2.1.0 --- .github/workflows/Docker-build-release.yaml | 20 ------------ .github/workflows/docker-build-release.yaml | 36 +++++++++++++++++++++ 2 files changed, 36 insertions(+), 20 deletions(-) delete mode 100644 .github/workflows/Docker-build-release.yaml create mode 100644 .github/workflows/docker-build-release.yaml diff --git a/.github/workflows/Docker-build-release.yaml b/.github/workflows/Docker-build-release.yaml deleted file mode 100644 index b2313d4..0000000 --- a/.github/workflows/Docker-build-release.yaml +++ /dev/null @@ -1,20 +0,0 @@ ---- -on: - push: - branches: ['main'] - tags: ['v*'] - release: - types: [published] - -jobs: - build-and-push-image: - runs-on: ubuntu-latest - name: A job to build and push a docker image - permissions: - contents: read - packages: write - steps: - - id: build-push - uses: uclahs-cds/tool-Docker-action/build-release@latest - with: - github-token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/docker-build-release.yaml b/.github/workflows/docker-build-release.yaml new file mode 100644 index 0000000..40ae5da --- /dev/null +++ b/.github/workflows/docker-build-release.yaml @@ -0,0 +1,36 @@ +--- +name: Update image in GHCR + +run-name: > + ${{ + github.event_name == 'delete' && format( + 'Delete `{0}{1}`', + github.event.ref_type == 'branch' && 'branch-' || '', + github.event.ref + ) + || github.ref == 'refs/heads/main' && 'Update `dev`' + || format( + 'Update `{0}{1}`', + !startsWith(github.ref, 'refs/tags') && 'branch-' || '', + github.ref_name + ) + }} docker tag + +on: + push: + branches-ignore: ['gh-pages'] + tags: ['v*'] + delete: + +jobs: + push-or-delete-image: + runs-on: ubuntu-latest + name: Update GitHub Container Registry + permissions: + contents: read + packages: write + steps: + - uses: uclahs-cds/tool-Docker-action@v2.1.0 + # Uncomment if you expect to use non-SemVer release tags + # with: + # non-semver-tags: true