chore(deps): update docker/metadata-action action to v5 #2119
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
# | |
# Nimbus | |
# CI | |
# Docker | |
# | |
name: Build and Publish Docker Containers | |
on: push | |
jobs: | |
publish-container: | |
name: "${{ matrix.container }}: Build & Publish Docker Container" | |
strategy: | |
fail-fast: false | |
matrix: | |
container: | |
- naiveproxy | |
runs-on: ubuntu-22.04 | |
# add permissions needed to push containers to GHCR with GITHUB_TOKEN | |
permissions: | |
contents: read | |
packages: write | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Log in to the GitHub Container registry | |
uses: docker/[email protected] | |
with: | |
registry: ghcr.io | |
username: "${{ github.actor }}" | |
password: "${{ secrets.GITHUB_TOKEN }}" | |
- id: docker-metadata | |
name: "Gather metadata for tagging / labeling ${{ matrix.source }} Container" | |
uses: docker/[email protected] | |
with: | |
images: "ghcr.io/${{ github.repository_owner }}/${{ matrix.container }}" | |
tags: | | |
type=ref,event=branch | |
type=ref,event=tag | |
type=semver,pattern={{version}} | |
# set latest tag for default branch (main) | |
type=raw,value=latest,enable={{is_default_branch}} | |
- name: "Build and Push ${{ matrix.container }} Container to GitHub Container Registry" | |
uses: docker/[email protected] | |
with: | |
context: "docker/${{ matrix.container }}" | |
tags: ${{ steps.docker-metadata.outputs.tags }} | |
labels: ${{ steps.docker-metadata.outputs.labels }} | |
push: true |