Skip to content

Commit

Permalink
Push arm64 builds to ghcr.
Browse files Browse the repository at this point in the history
  • Loading branch information
vpzqtsolv committed May 27, 2024
1 parent b15078a commit 6c70cc9
Showing 1 changed file with 53 additions and 0 deletions.
53 changes: 53 additions & 0 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: cd

on:
push:
branches: master

permissions:
contents: write
id-token: write
packages: write

jobs:
container:
name: Build Docker image
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install cosign
uses: sigstore/[email protected]
with:
cosign-release: v2.1.1
- name: Setup Docker buildx
uses: docker/[email protected]
- name: Log into registry ${{ env.REGISTRY }}
uses: docker/[email protected]
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Get branch name
shell: bash
run: echo "##[set-output name=git_branch;]$(echo ${GITHUB_REF##*/})"
id: extract_branch
- name: Extract Docker metadata
id: meta
uses: docker/[email protected]
with:
images: "${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}"
tags: |
type=raw,value=${{ steps.extract_branch.outputs.git_branch }}
- name: Build and push Docker image
id: build-and-push
uses: docker/[email protected]
with:
context: .
platforms: linux/amd64,linux/arm64
push: 'true'
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max=

0 comments on commit 6c70cc9

Please sign in to comment.