Skip to content

Transmission image build and publish #1

Transmission image build and publish

Transmission image build and publish #1

Workflow file for this run

# .Synopsis
# The workflow for building and publishing the Transmission docker image
#
# .NOTES
# Author : Roman Rabodzei
# Version : 1.0.240623
#
# _
# .__(.)< (MEOW)
# \___)
# ~~~~~~~~~~~~~~~~~~~~~~~~
name: "Transmission image build and publish"
on:
workflow_dispatch:
permissions:
id-token: write
contents: read
jobs:
build_image:
name: Build and Publish Docker image
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install Docker CE
run: |
sudo apt-get update
sudo apt-get install \
apt-transport-https \
ca-certificates \
curl \
gnupg-agent \
software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo apt-key fingerprint 0EBFCD88
sudo add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) \
stable"
sudo apt-get update
sudo apt-get install docker-ce docker-ce-cli containerd.io
apt-cache madison docker-ce
- name: Setup Docker buildx
run: |
mkdir -p ~/.docker
echo $'{\n "experimental": "enabled"\n}' | sudo tee ~/.docker/config.json;
sudo service docker restart
docker version
docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
docker buildx create --use --name mult
docker buildx inspect --bootstrap
docker buildx ls
- name: Build and Publish image
env:
TARGET_VERSION: ${{ github.run_number }}
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
DOCKERHUB_PASSWORD: ${{ secrets.DOCKERHUB_PASSWORD }}
run: |
echo $DOCKERHUB_PASSWORD | docker login --username $DOCKERHUB_USERNAME --password-stdin
docker buildx build --push --platform linux/amd64,linux/arm64,linux/arm/v7 \
--tag $DOCKERHUB_USERNAME/transmission:"$TARGET_VERSION.0" -f ./Dockerfile.transmission .
docker buildx build --push --platform linux/amd64,linux/arm64,linux/arm/v7 \
--tag $DOCKERHUB_USERNAME/transmission:latest -f ./Dockerfile.transmission .