Skip to content

Commit

Permalink
Push to docker repo
Browse files Browse the repository at this point in the history
  • Loading branch information
emilymclean committed Sep 19, 2024
1 parent 84cadbe commit ec3088f
Showing 1 changed file with 44 additions and 1 deletion.
45 changes: 44 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,47 @@ jobs:
tag_name: v${{ needs.version.outputs.version }}
release_name: Release ${{ needs.version.outputs.version }}
draft: false
prerelease: ${{ github.ref == 'refs/heads/develop' }}
prerelease: ${{ github.ref == 'refs/heads/develop' }}
docker:
runs-on: ubuntu-latest
needs: version
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
images: |
ghcr.io/${{ github.repository }}
tags: |
type=schedule
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
type=sha
- name: Log in to the Container registry
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
with:
registry: https://ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker image
uses: docker/build-push-action@v4
with:
context: .
platforms: linux/amd64
push: true
tags: |
${{ steps.meta.outputs.tags }}
ghcr.io/${{ github.repository }}:latest
ghcr.io/${{ github.repository }}:${{ needs.version.outputs.version }}

0 comments on commit ec3088f

Please sign in to comment.