Skip to content

Commit

Permalink
CI: add workflow for publishing Docker image
Browse files Browse the repository at this point in the history
  • Loading branch information
Kobzol committed Apr 3, 2024
1 parent d18f374 commit f01aa47
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/publish-image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Publish Docker image to ghcr.io

permissions:
packages: write

on:
push:
tags:
- 'v*'
pull_request:

jobs:
test:
name: Publish image
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v4

- uses: docker/login-action@v3
with:
registry: ghcr.io
username: kobzol
password: ${{ secrets.GITHUB_TOKEN }}

- uses: docker/setup-buildx-action@v3
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
platforms: linux/amd64,linux/arm64
push: ${{ github.event_name != 'pull_request' }}
tags: ghcr.io/kobzol/cargo-pgo:latest
# ghcr.io/kobzol/cargo-pgo:${{ github.ref_name }},

0 comments on commit f01aa47

Please sign in to comment.