2022-03-25 22:25:00 +00:00
|
|
|
name: Publish Docker Image
|
2022-03-25 21:39:33 +00:00
|
|
|
|
|
|
|
on:
|
|
|
|
workflow_dispatch:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- 'master'
|
|
|
|
paths:
|
|
|
|
- 'release-versions/latest.txt'
|
2022-03-25 21:50:44 +00:00
|
|
|
env:
|
|
|
|
IMAGE_REPO: mrtyton
|
|
|
|
IMAGE_NAME: automated-ffdl
|
|
|
|
|
2022-03-25 21:39:33 +00:00
|
|
|
jobs:
|
|
|
|
Push-New-Release-Version-Image:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
|
|
|
|
- name: Set up QEMU
|
|
|
|
uses: docker/setup-qemu-action@v1
|
|
|
|
|
|
|
|
- name: Setup Docker Buildx
|
|
|
|
uses: docker/setup-buildx-action@v1
|
|
|
|
|
|
|
|
- name: Get environment variables
|
|
|
|
uses: FranzDiebold/github-env-vars-action@v2
|
|
|
|
|
|
|
|
- name: Set version
|
|
|
|
run: |
|
|
|
|
RELEASE_VERSION=$(cat release-versions/latest.txt)
|
2022-03-26 00:15:58 +00:00
|
|
|
echo "RELEASE_VERSION=latest" >> $GITHUB_ENV
|
2022-03-25 21:39:33 +00:00
|
|
|
CALIBRE_VERSION=$(cat release-versions/calibre.txt)
|
2022-03-25 21:43:39 +00:00
|
|
|
echo "CALIBRE_VERSION=$CALIBRE_VERSION" >> $GITHUB_ENV
|
2022-03-25 21:39:33 +00:00
|
|
|
FFF_VERSION=$(cat release-versions/fff.txt)
|
2022-03-25 21:43:39 +00:00
|
|
|
echo "FFF_VERSION=$FFF_VERSION" >> $GITHUB_ENV
|
2022-03-25 21:50:44 +00:00
|
|
|
- name: Print image tag
|
|
|
|
run: |
|
|
|
|
echo "Branch: $CI_ACTION_REF_NAME"
|
2022-03-25 21:52:37 +00:00
|
|
|
echo "Release Version: ${{ env.RELEASE_VERSION }}"
|
2022-03-25 21:50:44 +00:00
|
|
|
echo "Calibre Version: ${{ env.CALIBRE_VERSION }}"
|
|
|
|
echo "FFF Version: ${{ env.FFF_VERSION }}"
|
2022-03-25 21:39:33 +00:00
|
|
|
|
|
|
|
- name: Login to DockerHub
|
|
|
|
uses: docker/login-action@v1
|
|
|
|
with:
|
|
|
|
username: ${{ secrets.DOCKERHUB_USER }}
|
|
|
|
password: ${{ secrets.DOCKERHUB_PASSWORD }}
|
|
|
|
|
|
|
|
- name: Build and push
|
|
|
|
uses: docker/build-push-action@v2
|
|
|
|
with:
|
|
|
|
context: .
|
|
|
|
file: ./Dockerfile
|
|
|
|
platforms: linux/amd64,linux/arm64
|
|
|
|
push: true
|
2022-03-26 00:40:30 +00:00
|
|
|
tags: ${{ env.IMAGE_REPO }}/${{ env.IMAGE_NAME }}:${{ env.RELEASE_VERSION }}
|
2022-09-12 10:32:59 +00:00
|
|
|
build-args: |
|
|
|
|
VERSION=${{ env.RELEASE_VERSION }}
|
|
|
|
CALIBRE_RELEASE=${{ env.CALIBRE_VERSION }}
|
|
|
|
FFF_RELEASE=${{ env.FFF_VERSION }}
|