Skip to content

aznamingtool

aznamingtool #362

Workflow file for this run

name: aznamingtool
on:
push:
branches:
- main
paths:
- aznamingtool/*
- .github/workflows/aznamingtool.yml
workflow_dispatch:
schedule:
- cron: "0 8 * * 1"
env:
BUILD_VERSION: "git"
DOCKER_CLI_EXPERIMENTAL: enabled
REPOSITORY: ${{ github.actor }}/${{ github.workflow }}
permissions: read-all
jobs:
deploy:
runs-on: ubuntu-24.04
permissions:
packages: write
id-token: write
steps:
- name: Harden Runner
uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7
with:
egress-policy: block
disable-telemetry: true
disable-sudo: true
allowed-endpoints: >
api.github.com:443
api.nuget.org:443
auth.docker.io:443
centralus.data.mcr.microsoft.com:443
dc.services.visualstudio.com:443
dl-cdn.alpinelinux.org:443
eastus.data.mcr.microsoft.com:443
ghcr.io:443
github.com:443
pkg-containers.githubusercontent.com:443
index.docker.io:443
mcr.microsoft.com:443
production.cloudflare.docker.com:443
registry-1.docker.io:443
westus.data.mcr.microsoft.com:443
westus2.data.mcr.microsoft.com:443
westcentralus.data.mcr.microsoft.com:443
- name: Source checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v2.4.0
- name: Setup QEMU
id: qemu
uses: docker/setup-qemu-action@49b3bc8e6bdd4a60e6116a5414239cba5943d3cf # v1.2.0
- name: Setup Buildx
id: buildx
uses: docker/setup-buildx-action@c47758b77c9736f4b2ef4073d4d51994fabfe349 # v1
- name: Set Docker metadata
id: docker_meta
uses: docker/metadata-action@8e5442c4ef9f78752691e2d8f8d19755c6f78e81 # v3
with:
images: ${{ env.REPOSITORY }}
tags: |
type=sha,format=long,prefix=sha256:
labels: |
org.opencontainers.image.version=${{ env.BUILD_VERSION }}
org.opencontainers.image.revision=${{ github.sha }}
org.opencontainers.image.title=${{ env.REPOSITORY }}
- name: GitHub login
if: ${{ github.event_name != 'pull_request' }}
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v1.12.0
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: DockerHub login
if: ${{ github.event_name != 'pull_request' }}
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v1.12.0
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- name: Build and push
id: push-step
uses: docker/build-push-action@4f58ea79222b3b9dc2c8bbdd6debcef730109a75 # v2.8.0
with:
push: ${{ github.event_name != 'pull_request' }}
context: ${{ github.workflow }}
#platforms: linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v6,linux/ppc64le
#platforms: linux/amd64,linux/arm64,linux/arm/v7
#platforms: linux/amd64,linux/arm64
platforms: linux/amd64
#platforms: ${{ matrix.arch }}
build-args: |
BUILD_VERSION
sbom: true
provenance: true
cache-from: type=gha, scope=${{ github.workflow }}
cache-to: type=gha, scope=${{ github.workflow }}
labels: ${{ steps.docker_meta.outputs.labels }}
tags: |
docker.io/${{ env.REPOSITORY }}:${{ env.BUILD_VERSION }}
docker.io/${{ env.REPOSITORY }}:latest
ghcr.io/${{ env.REPOSITORY }}:${{ env.BUILD_VERSION }}
ghcr.io/${{ env.REPOSITORY }}:latest
docs:
needs: deploy
runs-on: ubuntu-24.04
steps:
- name: Source checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v2.4.0
- name: Update DockerHub description
uses: peter-evans/dockerhub-description@e98e4d1628a5f3be2be7c231e50981aee98723ae # v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
repository: ${{ env.REPOSITORY }}
readme-filepath: ${{ github.workflow }}/README.md