v8.11.1 #40
Workflow file for this run
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 | |
on: | |
release: # Docs: <https://git.io/JeBz1#release-event-release> | |
types: [published] | |
jobs: | |
docker-image: | |
name: Build docker image | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- {uses: gacts/github-slug@v1, id: slug} | |
- uses: docker/setup-qemu-action@v3 | |
- uses: docker/setup-buildx-action@v3 | |
- uses: docker/#-action@v3 | |
with: {username: '${{ secrets.DOCKER_LOGIN }}', password: '${{ secrets.DOCKER_PASSWORD }}'} | |
- uses: docker/#-action@v3 | |
with: {registry: ghcr.io, username: '${{ github.actor }}', password: '${{ secrets.GITHUB_TOKEN }}'} | |
- uses: docker/build-push-action@v6 | |
with: | |
context: . | |
file: Dockerfile | |
push: true | |
platforms: linux/amd64,linux/386,linux/arm64,linux/arm/v6,linux/arm/v7 # <-- important | |
tags: | | |
tarampampam/curl:${{ steps.slug.outputs.version }} | |
tarampampam/curl:latest | |
ghcr.io/${{ github.actor }}/curl:${{ steps.slug.outputs.version }} | |
ghcr.io/${{ github.actor }}/curl:latest | |
- uses: docker/build-push-action@v6 | |
with: | |
context: . | |
file: Dockerfile | |
push: true | |
platforms: linux/amd64,linux/386,linux/arm64,linux/arm/v6,linux/arm/v7 | |
build-args: "BASE_IMAGE=alpine:latest" | |
tags: | | |
tarampampam/curl:${{ steps.slug.outputs.version }}-alpine | |
tarampampam/curl:latest-alpine | |
ghcr.io/${{ github.actor }}/curl:${{ steps.slug.outputs.version }}-alpine | |
ghcr.io/${{ github.actor }}/curl:latest-alpine | |
binary-files: | |
name: Publish the binary file (${{ matrix.platform }}) | |
runs-on: ubuntu-latest | |
needs: [docker-image] | |
strategy: | |
matrix: | |
platform: # the list should be the same as the platforms listed above | |
- linux/amd64 | |
- linux/386 | |
- linux/arm64 | |
- linux/arm/v6 | |
- linux/arm/v7 | |
steps: | |
- uses: actions/checkout@v4 | |
- {uses: gacts/github-slug@v1, id: slug} | |
- uses: docker/#-action@v3 | |
with: {registry: ghcr.io, username: '${{ github.actor }}', password: '${{ secrets.GITHUB_TOKEN }}'} | |
- run: | | |
docker pull --platform "${{ matrix.platform }}" ghcr.io/${{ github.actor }}/curl:${{ steps.slug.outputs.version }} | |
docker create --name app --platform "${{ matrix.platform }}" ghcr.io/${{ github.actor }}/curl:${{ steps.slug.outputs.version }} | |
docker cp app:/bin/curl ./curl | |
- {uses: gacts/github-slug@v1, id: filename, with: {to-slug: 'curl-${{ matrix.platform }}'}} | |
- name: Upload the binary file to the release | |
uses: svenstaro/upload-release-action@v2 | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
file: ./curl | |
asset_name: ${{ steps.filename.outputs.slug }} | |
tag: ${{ github.ref }} |