Skip to content

Tag with the run number #16

Tag with the run number

Tag with the run number #16

Workflow file for this run

name: Docker Image CI
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
jobs:
build:
runs-on: arc-runner
steps:
-
name: Install git
run: sudo apt-get update && sudo apt-get install -y git
-
name: Check out main repository
uses: actions/checkout@v4
with:
submodules: true
-
name: Check out aux repository 1
uses: actions/checkout@v4
with:
repository: ilyannn/publish-secret-docs
path: build/publish-secret-docs
token: ${{ secrets.TOKEN_READ_MEGAVERSE_CONFIG }}
-
name: Check out aux repository 2
uses: actions/checkout@v4
with:
repository: ilyannn/hetzner-k3s-main
path: build/hetzner-k3s-main
token: ${{ secrets.TOKEN_READ_MEGAVERSE_CONFIG }}
-
name: Login to Cluster Registry
uses: docker/login-action@v3
with:
registry: registry.cluster.megaver.se
username: robot$github
password: ${{ secrets.HARBOR_TOKEN_ROBOT_GITHUB }}
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
-
name: Compute the tag
id: tag
run: echo "::set-output name=TAG::commit-$(echo ${GITHUB_SHA::8}-$(date +'%Y%m%d%H%M%S'))"
-
name: Build and push the Docker image
uses: docker/build-push-action@v5
with:
context: .
push: true
images: registry.cluster.megaver.se/library/hetzner-k3s-docs-webserver
tags: latest,${{ steps.tag.outputs.TAG }},run-${{ github.run_number }}-${{ github.run_attempt }}