Read inputs from yaml or json #4
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: Docker image | |
on: | |
push: | |
jobs: | |
build-push: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
cli: ["get_urls", "make_stac"] | |
permissions: | |
contents: read | |
packages: write | |
attestations: write | |
id-token: write | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Log in to ghcr | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Get image metadata | |
id: meta | |
uses: docker/metadata-action@v5 | |
with: | |
images: ghcr.io/${{ github.repository }}/${{ matrix.cli }} | |
- name: Build and push image | |
id: push | |
uses: docker/build-push-action@v6 | |
with: | |
context: ./cli/${{ matrix.cli }} | |
push: true | |
tags: ${{ steps.meta.outputs.tags }} | |
labels: ${{ steps.meta.outputs.labels }} | |
- name: Generate artifact attestation | |
uses: actions/attest-build-provenance@v1 | |
with: | |
subject-name: ghcr.io/${{ github.repository }}/${{ matrix.cli }} | |
subject-digest: ${{ steps.push.outputs.digest }} | |
push-to-registry: true |