Skip to content

Commit

Permalink
Combine release and publish workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
njbbaer committed Jan 27, 2024
1 parent 7fd125a commit 54be5be
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 29 deletions.
1 change: 0 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ jobs:
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}


lint:
runs-on: ubuntu-latest
steps:
Expand Down
27 changes: 0 additions & 27 deletions .github/workflows/publish.yml

This file was deleted.

24 changes: 23 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,26 @@ jobs:
uses: actions/checkout@v4

- name: Create GitHub Release
uses: ncipollo/release-action@v1
uses: ncipollo/release-action@v1

publish:
requires: release
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Login to GHCR
run: echo ${{ secrets.GITHUB_TOKEN }} | docker login ghcr.io -u ${{ github.actor }} --password-stdin

- name: Build Docker image
run: docker build -t ghcr.io/${{ github.repository }}:${{ github.ref_name }} .

- name: Tag image as latest
run: docker tag ghcr.io/${{ github.repository }}:${{ github.ref_name }} ghcr.io/${{ github.repository }}:latest

- name: Push versioned tag to GHCR
run: docker push ghcr.io/${{ github.repository }}:${{ github.ref_name }}

- name: Push latest tag to GHCR
run: docker push ghcr.io/${{ github.repository }}:latest

0 comments on commit 54be5be

Please sign in to comment.