Skip to content

Commit

Permalink
Merge pull request #69 from illallangi/repo-sync/github/default
Browse files Browse the repository at this point in the history
🔄 synced file(s) with illallangi/.github
  • Loading branch information
andrewcole authored Jan 2, 2024
2 parents ac241e0 + fde4478 commit 9a9771c
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 27 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/build-and-push.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
---
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: "0"
- id: version
name: Get Version
run: echo "tag=${GITHUB_REF#refs/*/}" >> "${GITHUB_OUTPUT}"
- id: meta
name: Docker meta
uses: docker/metadata-action@v5
with:
flavor: prefix=v,onlatest=false
images: ghcr.io/${{ github.repository }}
tags: type=semver,pattern={{version}},value=${{ steps.version.outputs.tag }}
- 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:
password: ${{ secrets.PAT }}
registry: ghcr.io
username: ${{ github.repository_owner }}
- name: Build and push
uses: docker/build-push-action@v5
with:
build-args: |
hooks=adsbs
cache-from: type=gha
cache-to: type=gha,mode=max
context: .
labels: ${{ steps.meta.outputs.labels }}
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.meta.outputs.tags }}
name: Build and Push
on:
push:
tags:
- "*"
27 changes: 0 additions & 27 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,33 +12,6 @@ jobs:
id: version
name: Bump version and push tag
uses: anothrNick/[email protected]
- id: meta
name: Docker meta
uses: docker/metadata-action@v5
with:
flavor: prefix=v,onlatest=false
images: ghcr.io/${{ github.repository }}
tags: type=semver,pattern={{version}},value=${{ steps.version.outputs.new_tag }}
- 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:
password: ${{ secrets.PAT }}
registry: ghcr.io
username: ${{ github.repository_owner }}
- name: Build and push
uses: docker/build-push-action@v5
with:
cache-from: type=gha
cache-to: type=gha,mode=max
context: .
labels: ${{ steps.meta.outputs.labels }}
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.meta.outputs.tags }}
- env:
GITHUB_REPOSITORY: ${{ github.repository }}
GITHUB_TOKEN: ${{ secrets.PAT }}
Expand Down

0 comments on commit 9a9771c

Please sign in to comment.