You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

59 lines
1.9 KiB
YAML

name: Image Build
on:
# Manueel starte
workflow_dispatch:
jobs:
init:
runs-on: ubuntu-latest
# Map a step output to a job output
outputs:
iventoy: ${{ steps.healthchecks.outputs.version }}
steps:
-
name: check version iventoy
id: iventoy
run: |
echo "version=$(echo iventoy-1.0.07-linux.tar.gz | cut -d '-' -f2)" >> $GITHUB_OUTPUT
-
name: print
run: |
echo ${{ steps.iventoy.outputs.version }}
docker:
name: iventoy image
runs-on: ubuntu-latest
needs:
- init
steps:
-
name: init vars
run: |
echo "iventoy: ${{ needs.init.outputs.iventoy }}"
-
name: Checkout
uses: actions/checkout@v3
-
name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
-
name: Build and push
uses: docker/build-push-action@v3
with:
provenance: false # Breaking change introduced with 3.3.0 https://github.com/docker/build-push-action/releases/tag/v3.3.0, when an image is pushed since that version I can't retrieve the blob with labels anymore based on the digest via registry api, night have to look into an alternative way to do this
context: .
file: ./Dockerfile
labels: |
IVENTOY=${{ needs.init.outputs.iventoy }}
build-args: |
IVENTOY=${{ needs.init.outputs.iventoy }}
push: true
tags: |
${{ secrets.DOCKERHUB_USERNAME }}/${{ github.event.repository.name }}:${{ needs.init.outputs.iventoy }}
${{ secrets.DOCKERHUB_USERNAME }}/${{ github.event.repository.name }}:latest