You've already forked git-docker
99 lines
3.3 KiB
YAML
99 lines
3.3 KiB
YAML
name: Release
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
|
|
jobs:
|
|
push-arm64:
|
|
runs-on: ubuntu-latest-arm64
|
|
steps:
|
|
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
|
- uses: docker/setup-qemu-action@06116385d9baf250c9f4dcb4858b16962ea869c3 # v4.1.0
|
|
- uses: docker/setup-buildx-action@d7f5e7f509e45cec5c76c4d5afdd7de93d0b3df5 # v4.1.0
|
|
|
|
- uses: docker/login-action@650006c6eb7dba73a995cc03b0b2d7f5ca915bee # v4.2.0
|
|
with:
|
|
registry: git.cryptic.systems
|
|
username: ${{ github.repository_owner }}
|
|
password: ${{ secrets.GIT_CRYPTIC_SYSTEMS_PACKAGE_REGISTRY_TOKEN }}
|
|
|
|
- name: Build and push image
|
|
run: |
|
|
TAG=$(echo ${{ github.ref_name }} | sed 's/v//gm')
|
|
|
|
docker buildx build \
|
|
--file Dockerfile \
|
|
--platform linux/arm64 \
|
|
--provenance false \
|
|
--push \
|
|
--tag git.cryptic.systems/volker.raschek/git:${TAG}-arm64 \
|
|
.
|
|
|
|
push-amd64:
|
|
runs-on: ubuntu-latest-amd64
|
|
steps:
|
|
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
|
- uses: docker/setup-qemu-action@06116385d9baf250c9f4dcb4858b16962ea869c3 # v4.1.0
|
|
- uses: docker/setup-buildx-action@d7f5e7f509e45cec5c76c4d5afdd7de93d0b3df5 # v4.1.0
|
|
|
|
- uses: docker/login-action@650006c6eb7dba73a995cc03b0b2d7f5ca915bee # v4.2.0
|
|
with:
|
|
registry: git.cryptic.systems
|
|
username: ${{ github.repository_owner }}
|
|
password: ${{ secrets.GIT_CRYPTIC_SYSTEMS_PACKAGE_REGISTRY_TOKEN }}
|
|
|
|
- name: Build and push image
|
|
run: |
|
|
TAG=$(echo ${{ github.ref_name }} | sed 's/v//gm')
|
|
|
|
docker buildx build \
|
|
--file Dockerfile \
|
|
--platform linux/amd64 \
|
|
--provenance false \
|
|
--push \
|
|
--tag git.cryptic.systems/volker.raschek/git:${TAG}-amd64 \
|
|
.
|
|
|
|
push-manifest:
|
|
runs-on: ubuntu-latest
|
|
needs:
|
|
- push-arm64
|
|
- push-amd64
|
|
steps:
|
|
- uses: docker/login-action@650006c6eb7dba73a995cc03b0b2d7f5ca915bee # v4.2.0
|
|
with:
|
|
registry: git.cryptic.systems
|
|
username: ${{ github.repository_owner }}
|
|
password: ${{ secrets.GIT_CRYPTIC_SYSTEMS_PACKAGE_REGISTRY_TOKEN }}
|
|
|
|
- name: Create and push manifest
|
|
run: |
|
|
TAG=$(echo ${{ github.ref_name }} | sed 's/v//gm')
|
|
|
|
docker manifest create git.cryptic.systems/volker.raschek/git:${TAG} \
|
|
--amend git.cryptic.systems/volker.raschek/git:${TAG}-amd64 \
|
|
--amend git.cryptic.systems/volker.raschek/git:${TAG}-arm64
|
|
|
|
docker manifest push git.cryptic.systems/volker.raschek/git:${TAG}
|
|
|
|
sync-to-hub-docker-io:
|
|
needs:
|
|
- push-manifest
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Copy images to docker.io
|
|
run: |
|
|
TAG=$(echo ${{ github.ref_name }} | sed 's/v//gm')
|
|
|
|
apt-get update --yes
|
|
apt-get install --yes skopeo
|
|
skopeo copy \
|
|
--all \
|
|
--dest-password ${{ secrets.DOCKER_IO_PASSWORD }} \
|
|
--dest-username ${{ secrets.DOCKER_IO_USERNAME }} \
|
|
--src-password ${{ secrets.GIT_CRYPTIC_SYSTEMS_PACKAGE_REGISTRY_TOKEN }} \
|
|
--src-username volker.raschek \
|
|
docker://git.cryptic.systems/volker.raschek/git:${TAG} \
|
|
docker://docker.io/volkerraschek/git:${TAG} |