2.10.0 #44
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
on: | |
release: | |
types: | |
- published | |
env: | |
IMAGE_NAME: artis3n/ansible_galaxy_collection | |
name: Release | |
jobs: | |
release: | |
name: Release GitHub Actions | |
needs: | |
- deploy | |
runs-on: ubuntu-latest | |
steps: | |
- name: Semver release | |
uses: technote-space/release-github-actions@v8 | |
with: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
CLEAN_TARGETS: '' | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Get the version | |
run: echo "RELEASE_VERSION=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v2 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
with: | |
install: true | |
- name: Docker meta | |
id: meta | |
uses: docker/metadata-action@v4 | |
with: | |
images: | | |
ghcr.io/${{ env.IMAGE_NAME }} | |
tags: | | |
type=raw,value=latest | |
type=raw,value=${{ env.RELEASE_VERSION }} | |
- name: Login to GitHub Container Registry | |
uses: docker/login-action@v2 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build and Push | |
uses: docker/build-push-action@v4 | |
with: | |
context: . | |
platforms: linux/amd64, linux/arm64 | |
file: ./Dockerfile | |
push: true | |
tags: ${{ steps.meta.outputs.tags }} | |
labels: ${{ steps.meta.outputs.labels }} | |
cache-from: type=gha | |
cache-to: type=gha,mode=max |