This repository has been archived by the owner on Feb 9, 2024. It is now read-only.
docs: Add examples for other type of registries #8573
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: build | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
permissions: | |
contents: read | |
id-token: write | |
packages: write | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.number || github.ref }} | |
cancel-in-progress: true | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
timeout-minutes: 120 | |
steps: | |
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0 | |
- uses: sigstore/cosign-installer@11086d25041f77fe8fe7b9ea4e48e3b9192b8f19 # v3.1.2 | |
- name: Docker registry login | |
if: github.ref_name == 'main' | |
run: | | |
echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u ${{ secrets.DOCKER_USERNAME }} --password-stdin | |
echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.repository_owner }} --password-stdin | |
- name: Build and Publish | |
uses: containerbase/internal-tools@68271ad7fc19248e8d7f26c9c82c57e984d886ea # v1.21.26 | |
with: | |
command: docker-builder | |
platforms: ${{ github.ref_name == 'main' && 'linux/amd64,linux/arm64' || '' }} | |
image-prefixes: ghcr.io/${{ github.repository_owner }} | |
last-only: true | |
dry-run: ${{ github.ref_name != 'main' }} | |
- name: Build and Publish slim | |
if: github.ref_name == 'main' | |
uses: containerbase/internal-tools@68271ad7fc19248e8d7f26c9c82c57e984d886ea # v1.21.26 | |
with: | |
command: docker-builder | |
image-prefixes: ghcr.io/${{ github.repository_owner }} | |
last-only: true | |
tag-suffix: slim |