Skip to content

0.5.0

0.5.0 #2

Workflow file for this run

name: publish
on:
release:
types: [published]
env:
TEST_TAG: ghcr.io/immobiliare/peephole:test
LATEST_TAG: ghcr.io/immobiliare/peephole:latest
NEW_TAG: ghcr.io/immobiliare/peephole:${{ github.event.release.tag_name }}
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: docker/setup-qemu-action@v3
- uses: docker/setup-buildx-action@v3
- uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GH_SRE_TOKEN }}
- name: Build and export to Docker
uses: docker/build-push-action@v5
with:
context: .
load: true
tags: ${{ env.TEST_TAG }}
- name: Test Docker Image
run: |
docker run --rm ${{ env.TEST_TAG }} peephole -h
- name: Build and push Docker Image
uses: docker/build-push-action@v5
with:
context: .
tags: ${{ env.NEW_TAG }}, ${{ env.LATEST_TAG }}
push: true