Merge pull request #64 from peng9808/main #36
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release Shipper Image | |
on: | |
push: | |
branches: [ "main" ] | |
paths: | |
- 'docker-shipper/*' | |
- 'docker-shipper/*/*' | |
- "helm/drbd-adapter/Chart.yaml" | |
- '.github/workflow/release-shipper-images.yml' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
permissions: | |
packages: write | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Set up QEMU | |
id: qemu | |
uses: docker/setup-qemu-action@v1 | |
with: | |
image: tonistiigi/binfmt:latest | |
platforms: all | |
- name: Available platforms | |
run: echo ${{ steps.qemu.outputs.platforms }} | |
- name: Configure Docker | |
run: | | |
sudo cp -vf docker_daemon.json /etc/docker/daemon.json | |
sudo systemctl restart docker | |
- name: Build shipper images | |
run: make shipper REG=ghcr.io/$( echo ${{ github.repository_owner }} | tr 'A-Z' 'a-z' ) | |
- name: Login registry | |
run: | | |
echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin | |
- name: Push images | |
run: | | |
make push REG=ghcr.io/$( echo ${{ github.repository_owner }} | tr 'A-Z' 'a-z' ) IMG=shipper |