Merge pull request #119 from linkorb/generated-workflows-cleanup-9358 #9
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 & Release | |
on: | |
push: | |
tags: | |
- '*' | |
permissions: | |
packages: write | |
contents: write | |
jobs: | |
repo-ansible-container: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- run: echo "${{ github.ref_name }}" > .gitrelease | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
with: | |
# moby/buildkit v0.11.0 causes untagged images to appear in github | |
# packages and the workaround does not seem to have any effect | |
# (set provenance=false in docker/build-push-action@v4) | |
driver-opts: network=host,image=moby/buildkit:v0.10.5 | |
- name: Docker meta | |
id: meta | |
uses: docker/metadata-action@v5 | |
with: | |
images: ghcr.io/${{ github.repository }} | |
tags: | | |
type=sha | |
type=raw,value=latest,enable=true | |
type=raw,value=${{ github.ref_name }} | |
- uses: softprops/action-gh-release@v2 | |
with: | |
generate_release_notes: true | |
make_latest: true | |
- name: Login to Container Registry ghcr.io | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build and push | |
uses: docker/build-push-action@v6 | |
with: | |
context: . | |
provenance: false | |
push: true | |
tags: ${{ steps.meta.outputs.tags }} | |
labels: ${{ steps.meta.outputs.labels }} | |
cache-to: type=gha | |
cache-from: type=gha | |
reviewdog-container: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
with: | |
# moby/buildkit v0.11.0 causes untagged images to appear in github | |
# packages and the workaround does not seem to have any effect | |
# (set provenance=false in docker/build-push-action@v4) | |
driver-opts: network=host,image=moby/buildkit:v0.10.5 | |
- name: Docker meta | |
id: meta | |
uses: docker/metadata-action@v5 | |
with: | |
images: ghcr.io/${{ github.repository }}/reviewdog | |
tags: | | |
type=sha | |
type=raw,value=latest,enable=true | |
type=raw,value=${{ github.ref_name }} | |
- name: Login to Container Registry ghcr.io | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build and push | |
uses: docker/build-push-action@v6 | |
with: | |
context: ./docker/reviewdog/ | |
provenance: false | |
push: true | |
tags: ${{ steps.meta.outputs.tags }} | |
labels: ${{ steps.meta.outputs.labels }} | |
cache-to: type=gha | |
cache-from: type=gha |