Skip to content

Commit

Permalink
C: Release
Browse files Browse the repository at this point in the history
  • Loading branch information
JanMikes committed Oct 30, 2023
1 parent 9923b60 commit 4bb02c5
Showing 1 changed file with 57 additions and 0 deletions.
57 changes: 57 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# https://github.com/docker/build-push-action/blob/master/docs/advanced/tags-labels.md

name: Release

on:
workflow_run:
workflows: [Tests]
types:
- completed
branches:
- main

jobs:
docker:
name: "Docker images"
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' }}
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Docker meta
id: meta
uses: docker/metadata-action@v3
with:
# list of Docker images to use as base name for tags
images: |
ghcr.io/speedpuzzling/speedpuzzling
# generate Docker tags based on the following events/attributes
tags: |
type=ref,event=branch
type=sha
- name: Set up QEMU
uses: docker/setup-qemu-action@v1

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1

- name: Login to GHCR
if: github.event_name != 'pull_request'
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push
uses: docker/build-push-action@v2
with:
context: .
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
platforms: linux/amd64
cache-from: type=gha, scope=${{ github.workflow }}
cache-to: type=gha, scope=${{ github.workflow }}

0 comments on commit 4bb02c5

Please sign in to comment.