Skip to content

ArchiSteamFarm V5.5.1.2 #63

ArchiSteamFarm V5.5.1.2

ArchiSteamFarm V5.5.1.2 #63

name: ASF-docker-publish-latest
on:
release:
types: [released]
env:
ASF_PRIVATE_SNK: ${{ secrets.ASF_PRIVATE_SNK }}
PLATFORMS: linux/amd64,linux/arm,linux/arm64
TAG: latest
permissions:
packages: write
jobs:
main:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/[email protected]
with:
show-progress: false
submodules: recursive
- name: Set up Docker Buildx
uses: docker/[email protected]
- name: Login to ghcr.io
uses: docker/[email protected]
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Login to DockerHub
uses: docker/[email protected]
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Prepare private key for signing
shell: sh
run: |
set -eu
if [ -n "${ASF_PRIVATE_SNK-}" ]; then
echo "$ASF_PRIVATE_SNK" | base64 -d > "resources/ArchiSteamFarm.snk"
fi
- name: Prepare environment outputs
shell: sh
run: |
set -eu
echo "FIXED_TAG=$(echo ${{ github.ref }} | cut -d '/' -f 3)" >> "$GITHUB_ENV"
echo "DATE_ISO8601=$(date --iso-8601=seconds --utc)" >> "$GITHUB_ENV"
echo "GHCR_REPOSITORY=$(echo ${{ github.repository }} | tr '[:upper:]' '[:lower:]')" >> "$GITHUB_ENV"
echo "DH_REPOSITORY=$(echo ${{ secrets.DOCKERHUB_USERNAME }}/${{ github.event.repository.name }} | tr '[:upper:]' '[:lower:]')" >> "$GITHUB_ENV"
- name: Build and publish Docker image from Dockerfile.Service
uses: docker/[email protected]
with:
context: .
file: Dockerfile.Service
platforms: ${{ env.PLATFORMS }}
build-args: STEAM_TOKEN_DUMPER_TOKEN=${{ secrets.STEAM_TOKEN_DUMPER_TOKEN }}
labels: |
org.opencontainers.image.created=${{ env.DATE_ISO8601 }}
org.opencontainers.image.version=${{ env.FIXED_TAG }}
org.opencontainers.image.revision=${{ github.sha }}
tags: |
ghcr.io/${{ env.GHCR_REPOSITORY }}:${{ env.TAG }}
${{ env.DH_REPOSITORY }}:${{ env.TAG }}
push: true