Skip to content

set ARG before from

set ARG before from #3

name: docker-hawccel-build
on:
push:
branches:
- main
workflow_dispatch:
schedule:
- cron: '0 0 1 * *'
env:
IMAGE_NAME: stash-s6
permissions:
packages: write
contents: read
jobs:
docker-hwaccel-build:
strategy:
matrix:
upstream: [latest, develop]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Get Git commit timestamps
run: echo "TIMESTAMP=$(git log -1 --pretty=%ct)" >> $GITHUB_ENV
- uses: docker/setup-qemu-action@v3
with:
platforms: arm,arm64
- uses: docker/setup-buildx-action@v3
- id: meta
uses: docker/metadata-action@v5
with:
images: |
ghcr.io/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}
docker.io/${{ secrets.DOCKERHUB_USERNAME }}/${{ env.IMAGE_NAME }}
tags: |
hwaccel
hwaccel-jf
- uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- name: build and push multi-arch hwaccel image
uses: docker/build-push-action@v5
with:
push: true
provenance: false
file: dockerfile/hwaccel.Dockerfile
platforms: linux/amd64,linux/arm64,linux/arm/v7
tags: ${{ steps.meta.outputs.tags }}
cache-from: type=gha
cache-to: type=gha,mode=max
build-args: |
STASH_TAG=${{ matrix.upstream }}
BUILD_DATE=${{ env.TIMESTAMP }}
env:
SOURCE_DATE_EPOCH: ${{ env.TIMESTAMP }}