Skip to content

Merge pull request #21 from sollie/bump_upx_5.0.1 #8

Merge pull request #21 from sollie/bump_upx_5.0.1

Merge pull request #21 from sollie/bump_upx_5.0.1 #8

Workflow file for this run

name: 'Docker build (tag)'
permissions:
contents: read
packages: write
on:
push:
tags:
- "v*"
env:
UPX_VERSION: 5.0.1
jobs:
build:
runs-on: ubuntu-latest
name: Build and upload on tag
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Get short SHA
id: sha_short
run: echo "sha_short=${GITHUB_SHA::7}" >> $GITHUB_OUTPUT
- id: tag
name: Get tag
run: echo "tag=${GITHUB_REF##*/}" >> $GITHUB_OUTPUT
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GHCR_PAT }}
- name: Build and Push Docker Image
uses: docker/build-push-action@v6
with:
context: ./
file: ./Dockerfile
platforms: linux/amd64,linux/arm64
cache-from: type=gha
cache-to: type=gha,mode=max
push: true
build-args: |
UPX_VERSION=${{ env.UPX_VERSION }}
tags: |
ghcr.io/${{ github.repository }}:latest
ghcr.io/${{ github.repository }}:${{ steps.tag.outputs.tag }}
ghcr.io/${{ github.repository }}:${{ steps.sha_short.outputs.sha_short }}