mirror of
https://github.com/atuinsh/atuin.git
synced 2024-11-22 08:13:57 +01:00
50e21d450e
Bumps [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) from 2 to 3. - [Release notes](https://github.com/docker/setup-buildx-action/releases) - [Commits](https://github.com/docker/setup-buildx-action/compare/v2...v3) --- updated-dependencies: - dependency-name: docker/setup-buildx-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
143 lines
4.6 KiB
YAML
143 lines
4.6 KiB
YAML
name: build-docker
|
|
|
|
on:
|
|
push:
|
|
branches: [ main ]
|
|
|
|
jobs:
|
|
|
|
publish_x86:
|
|
concurrency:
|
|
group: ${{ github.ref }}-x86
|
|
cancel-in-progress: true
|
|
permissions:
|
|
packages: write
|
|
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@master
|
|
with:
|
|
repository: atuinsh/atuin
|
|
path: "./"
|
|
|
|
- name: Setup mirror
|
|
uses: self-actuated/hub-mirror@master
|
|
|
|
- name: Get Repo Owner
|
|
id: get_repo_owner
|
|
run: echo "REPO_OWNER=$(echo ${{ github.repository_owner }} | tr '[:upper:]' '[:lower:]')" > $GITHUB_ENV
|
|
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v3
|
|
- name: Login to container Registry
|
|
uses: docker/login-action@v3
|
|
with:
|
|
username: ${{ github.repository_owner }}
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
registry: ghcr.io
|
|
|
|
- name: Get short sha
|
|
id: shortsha
|
|
run: echo "short_sha=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
|
|
|
|
- name: Release build
|
|
id: release_build
|
|
uses: docker/build-push-action@v6
|
|
with:
|
|
outputs: "type=registry,push=true"
|
|
platforms: linux/amd64
|
|
file: ./Dockerfile
|
|
context: .
|
|
provenance: false
|
|
build-args: |
|
|
Version=dev
|
|
GitCommit=${{ steps.shortsha.outputs.short_sha }}
|
|
tags: |
|
|
ghcr.io/${{ env.REPO_OWNER }}/atuin:${{ steps.shortsha.outputs.short_sha }}-amd64
|
|
|
|
|
|
publish_aarch64:
|
|
concurrency:
|
|
group: ${{ github.ref }}-aarch64
|
|
cancel-in-progress: true
|
|
permissions:
|
|
packages: write
|
|
|
|
runs-on: actuated-arm64-4cpu-16gb
|
|
steps:
|
|
- uses: actions/checkout@master
|
|
with:
|
|
repository: atuinsh/atuin
|
|
path: "./"
|
|
|
|
- name: Setup mirror
|
|
uses: self-actuated/hub-mirror@master
|
|
|
|
- name: Get Repo Owner
|
|
id: get_repo_owner
|
|
run: echo "REPO_OWNER=$(echo ${{ github.repository_owner }} | tr '[:upper:]' '[:lower:]')" > $GITHUB_ENV
|
|
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v3
|
|
- name: Login to container Registry
|
|
uses: docker/login-action@v3
|
|
with:
|
|
username: ${{ github.repository_owner }}
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
registry: ghcr.io
|
|
|
|
- name: Get short sha
|
|
id: shortsha
|
|
run: echo "short_sha=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
|
|
|
|
- name: Release build
|
|
id: release_build
|
|
uses: docker/build-push-action@v6
|
|
with:
|
|
outputs: "type=registry,push=true"
|
|
platforms: linux/arm64
|
|
file: ./Dockerfile
|
|
context: .
|
|
provenance: false
|
|
build-args: |
|
|
Version=dev
|
|
GitCommit=${{ steps.shortsha.outputs.short_sha }}
|
|
tags: |
|
|
ghcr.io/${{ env.REPO_OWNER }}/atuin:${{ steps.shortsha.outputs.short_sha }}-aarch64
|
|
|
|
publish_manifest:
|
|
runs-on: ubuntu-latest
|
|
needs: [publish_x86, publish_aarch64]
|
|
steps:
|
|
- uses: actions/checkout@master
|
|
with:
|
|
repository: atuinsh/atuin
|
|
path: "./"
|
|
|
|
- name: Get Repo Owner
|
|
id: get_repo_owner
|
|
run: echo "REPO_OWNER=$(echo ${{ github.repository_owner }} | tr '[:upper:]' '[:lower:]')" > $GITHUB_ENV
|
|
|
|
- name: Login to container Registry
|
|
uses: docker/login-action@v3
|
|
with:
|
|
username: ${{ github.repository_owner }}
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
registry: ghcr.io
|
|
|
|
- name: Get short sha
|
|
id: shortsha
|
|
run: echo "short_sha=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
|
|
|
|
- name: Create manifest
|
|
run: |
|
|
docker manifest create ghcr.io/${{ env.REPO_OWNER }}/atuin:${{ steps.shortsha.outputs.short_sha }} \
|
|
--amend ghcr.io/${{ env.REPO_OWNER }}/atuin:${{ steps.shortsha.outputs.short_sha }}-amd64 \
|
|
--amend ghcr.io/${{ env.REPO_OWNER }}/atuin:${{ steps.shortsha.outputs.short_sha }}-aarch64
|
|
docker manifest annotate --arch amd64 --os linux ghcr.io/${{ env.REPO_OWNER }}/atuin:${{ steps.shortsha.outputs.short_sha }} ghcr.io/${{ env.REPO_OWNER }}/atuin:${{ steps.shortsha.outputs.short_sha }}-amd64
|
|
docker manifest annotate --arch arm64 --os linux ghcr.io/${{ env.REPO_OWNER }}/atuin:${{ steps.shortsha.outputs.short_sha }} ghcr.io/${{ env.REPO_OWNER }}/atuin:${{ steps.shortsha.outputs.short_sha }}-aarch64
|
|
docker manifest inspect ghcr.io/${{ env.REPO_OWNER }}/atuin:${{ steps.shortsha.outputs.short_sha }}
|
|
|
|
docker manifest push ghcr.io/${{ env.REPO_OWNER }}/atuin:${{ steps.shortsha.outputs.short_sha }}
|
|
|