Skip to content

Commit

Permalink
gha: add publishing docker images to ghcr.io on release
Browse files Browse the repository at this point in the history
In case somebody wants to pull adam from ghcr.io for whatever
reason, they will have the opportunity to do so

Signed-off-by: Pavel Abramov <uncle.decart@gmail.com>
  • Loading branch information
uncleDecart committed Nov 27, 2024
1 parent 0e95654 commit f51c333
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ env:
jobs:
release:
runs-on: ubuntu-20.04
permissions:
packages: write
contents: read
attestations: write
id-token: write
steps:
- name: Checkout
uses: actions/checkout@v2
Expand All @@ -20,17 +25,18 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to DockerHub
uses: docker/login-action@v1
uses: docker/login-action@v2
with:
username: ${{ secrets.RELEASE_DOCKERHUB_ACCOUNT }}
password: ${{ secrets.RELEASE_DOCKERHUB_TOKEN }}
- name: Build and push
- name: Build and push to Dockerhub
id: docker_build
uses: docker/build-push-action@v2
uses: docker/build-push-action@v5
with:
platforms: linux/amd64,linux/arm64
push: true
tags: |
${{env.IMAGE_NAME}}:${{env.GITHUB_REF#refs/tags/}}
${{env.IMAGE_NAME}}:latest
ghcr.io/${{ github.repository_owner }}/adam:${{ github.event.release.tag_name }}
ghcr.io/${{ github.repository_owner }}/adam:latest

0 comments on commit f51c333

Please sign in to comment.