Skip to content

Commit

Permalink
use new common multi-arch CI/CD setup
Browse files Browse the repository at this point in the history
  • Loading branch information
traceypooh committed Feb 16, 2024
1 parent 32d3fbc commit a6c5a7d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 30 deletions.
29 changes: 4 additions & 25 deletions .github/workflows/cicd.yml
Original file line number Diff line number Diff line change
@@ -1,29 +1,8 @@
# This only does a (multi-architecture) [build]
# This does a (multi-architecture) [build]
# @see README.md for full CI/CD pipeline examples.

name: CICD
on: push
jobs:
build-for-linux-and-mac-arm:
runs-on: ubuntu-latest
permissions: { contents: read, packages: write, id-token: write }
steps:
- uses: internetarchive/build@v1
with:
REGISTRY_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Extract branch name
shell: bash
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
id: extract_branch

- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
platforms: linux/amd64,linux/arm64
push: true
tags: ghcr.io/${{ github.repository }}:${{ steps.extract_branch.outputs.branch }}
cicd:
# https://github.com/internetarchive/cicd
uses: internetarchive/cicd/.github/workflows/cicd-multi-arch.yml@main
7 changes: 2 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,9 @@ on: push
jobs:
build:
runs-on: ubuntu-latest
permissions: { contents: read, packages: write, id-token: write }
steps:
# https://github.com/internetarchive/build/blob/main/action.yml
- uses: internetarchive/build@v1
with:
REGISTRY_TOKEN: ${{ secrets.GITHUB_TOKEN }}

lint:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -88,8 +85,8 @@ See this repo as a great base for you to consider:
## Uses GitHub composite Actions
We use composite actions for minimizing boilerplate copying of our YAML into other repos.

This is our 'cicd' CI/CD action:
- https://github.com/internetarchive/cicd/blob/main/action.yml
This is our standard 'cicd' CI/CD action:
- https://github.com/internetarchive/cicd/

Documentation:
- https://github.blog/changelog/2021-08-25-github-actions-reduce-duplication-with-action-composition/
Expand Down

0 comments on commit a6c5a7d

Please sign in to comment.