Skip to content

Commit

Permalink
Merge pull request #8 from onedr0p/patch-2
Browse files Browse the repository at this point in the history
chore: update github workflow
  • Loading branch information
kashalls authored May 23, 2024
2 parents 1db4994 + 23cf5ee commit b696cc5
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 60 deletions.
60 changes: 0 additions & 60 deletions .github/workflows/build.yaml

This file was deleted.

58 changes: 58 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
---
name: Release

on:
pull_request:
push:
branches: ["main"]
release:
types: ["published"]

jobs:
build-image:
if: ${{ github.event.pull_request.head.repo.full_name == github.repository || github.event_name != 'pull_request' }}
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: |
ghcr.io/${{ github.repository }}
tags: |
type=semver,pattern={{version}},prefix=v
type=semver,pattern={{major}}.{{minor}},prefix=v
type=semver,pattern={{major}},prefix=v
type=ref,event=branch
type=ref,event=pr
flavor: |
latest=auto
- name: Set up QEMU
uses: docker/setup-qemu-action@v3

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

- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and Push
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

0 comments on commit b696cc5

Please sign in to comment.