v0.1.0 #7
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and publish | |
on: | |
pull_request: | |
branches: | |
- main | |
release: | |
types: [published] | |
jobs: | |
build: | |
name: Build and publish | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
packages: write | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Build the image | |
run: make build | |
- name: Log in to ghcr | |
uses: docker/login-action@v2 | |
if: github.event_name == 'release' | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Publish the image | |
if: github.event_name == 'release' | |
run: make publish | |
env: | |
TAG: ${{ github.ref_name }} |