Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
75 changes: 68 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,83 @@
name: Publish Docker Image

on:
release:
types:
- published
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+-[abcehlprt]+.?[0-9]?[0-9]?'

jobs:
push_to_registry:
name: Publish Docker Image
build-amd64:
name: Build for linux/amd64
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v2
- name: Push to Docker Hub
uses: docker/build-push-action@v1
uses: actions/checkout@v4

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
repository: tfgco/pusher
tag_with_ref: true

- name: Build and push amd64 image
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: tfgco/pusher:${{ github.ref_name }}-amd64
provenance: false

build-arm64:
name: Build for linux/arm64
runs-on: ubuntu-22.04-arm
steps:
- name: Check out the repo
uses: actions/checkout@v4

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Build and push arm64 image
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: tfgco/pusher:${{ github.ref_name }}-arm64
provenance: false

push-manifest:
name: Push multi-arch manifest
runs-on: ubuntu-latest
needs: [build-amd64, build-arm64]
steps:
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Inspect images before creating manifest (Debug Step)
run: |
echo "--- Inspecting AMD64 image ---"
docker buildx imagetools inspect tfgco/pusher:${{ github.ref_name }}-amd64
echo "--- Inspecting ARM64 image ---"
docker buildx imagetools inspect tfgco/pusher:${{ github.ref_name }}-arm64

- name: Create and push manifest
run: |
docker manifest create tfgco/pusher:${{ github.ref_name }} \
--amend tfgco/pusher:${{ github.ref_name }}-amd64 \
--amend tfgco/pusher:${{ github.ref_name }}-arm64
docker manifest push tfgco/pusher:${{ github.ref_name }}
Loading