update image build version to 4.0.6 #164
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: Image Builds | |
on: | |
push: | |
branches: | |
- master | |
- dev | |
paths-ignore: | |
- README.md | |
- docker-compose.yml | |
- mkdocs.yml | |
- .github/** | |
- docs/* | |
- images/* | |
- upstream/Dockerfile | |
- upstream/transmission-sha.txt | |
- upstream/transmission-version.txt | |
tags: | |
- 'v[0-9]+.[0-9]+.[0-9]+' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
image-name: | |
- haugene/transmission-openvpn | |
- haugene/transmission-openvpn-proxy | |
- haugene/transmission-rss | |
include: | |
- image-name: haugene/transmission-openvpn | |
context: ./ | |
- image-name: haugene/transmission-openvpn-proxy | |
context: ./proxy | |
- image-name: haugene/transmission-rss | |
context: ./plugins/rss | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
# QEMU emulator to build for other platforms | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
# Buildx automates creating the multi-arch manifest build | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
# Authenticate so that we can push to Docker Hub | |
- name: Log in to Docker Hub | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
# Generate image tags and labels | |
- name: Generate Docker metadata | |
id: meta | |
uses: docker/metadata-action@v5 | |
with: | |
images: | | |
${{ matrix.image-name }} | |
tags: | | |
type=edge | |
type=ref,event=branch | |
type=semver,pattern={{version}} | |
type=semver,pattern={{major}}.{{minor}} | |
type=semver,pattern={{major}} | |
# Finally, build and push the images | |
- name: Build image | |
uses: docker/build-push-action@v5 | |
with: | |
context: ${{ matrix.context }} | |
platforms: linux/amd64,linux/arm,linux/arm64 | |
build-args: | | |
REVISION=${{ github.sha }} | |
push: ${{ github.event_name != 'pull_request' }} | |
tags: ${{ steps.meta.outputs.tags }} | |
labels: ${{ steps.meta.outputs.labels }} | |
cache-from: type=gha, scope=${{ github.workflow }} | |
cache-to: type=gha, scope=${{ github.workflow}} |