From a6c5a7d10a1f4fddd769a3d67a02d588db1b4104 Mon Sep 17 00:00:00 2001 From: Tracey Jaquith Date: Thu, 15 Feb 2024 18:11:02 -0800 Subject: [PATCH] use new common multi-arch CI/CD setup --- .github/workflows/cicd.yml | 29 ++++------------------------- README.md | 7 ++----- 2 files changed, 6 insertions(+), 30 deletions(-) diff --git a/.github/workflows/cicd.yml b/.github/workflows/cicd.yml index 03c7605..ffb8b42 100644 --- a/.github/workflows/cicd.yml +++ b/.github/workflows/cicd.yml @@ -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 diff --git a/README.md b/README.md index 69f32c9..27f4b43 100644 --- a/README.md +++ b/README.md @@ -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 @@ -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/