From d311782b8cbfb269f81e6f0aec547dcb030221d7 Mon Sep 17 00:00:00 2001 From: Nicholas Wiltsie Date: Thu, 15 Aug 2024 13:33:07 -0700 Subject: [PATCH] Update tool-Docker-action to v2.1.0 --- .github/workflows/Docker-build-release.yaml | 22 ------------- .github/workflows/docker-build-release.yaml | 36 +++++++++++++++++++++ 2 files changed, 36 insertions(+), 22 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 c1b2078..0000000 --- a/.github/workflows/Docker-build-release.yaml +++ /dev/null @@ -1,22 +0,0 @@ ---- -name: Docker-build-release - -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