library_updated #419
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: CI | |
on: | |
workflow_dispatch: | |
repository_dispatch: | |
types: [library_updated] | |
push: | |
branches: [master] | |
paths-ignore: | |
- '**/README.md' | |
jobs: | |
multi: | |
runs-on: ubuntu-latest | |
steps: | |
- | |
name: Checkout | |
uses: actions/[email protected] | |
# with: | |
# persist-credentials: false | |
# - name: Reconfigure git to use HTTP authentication | |
# run: > | |
# git config --global url."https://github.com/".insteadOf | |
# ssh://[email protected]/ | |
- | |
name: Docker meta | |
id: meta | |
uses: docker/[email protected] | |
with: | |
# list of Docker images to use as base name for tags | |
images: | | |
ghcr.io/open-wa/wa-automate | |
openwa/wa-automate | |
# generate Docker tags based on the following events/attributes | |
tags: | | |
type=ref,event=pr | |
type=ref,event=branch,enable=${{ !endsWith(github.ref, github.event.repository.default_branch) }} | |
type=raw,value=latest | |
flavor: | | |
latest=false | |
- | |
name: Set up QEMU | |
uses: docker/[email protected] | |
- | |
name: Set up Docker Buildx | |
uses: docker/[email protected] | |
- | |
name: Login to Docker Hub | |
uses: docker/[email protected] | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- | |
name: Login to GitHub Container Registry | |
uses: docker/[email protected] | |
with: | |
registry: ghcr.io | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.CR_PAT }} | |
- | |
name: Build and push | |
uses: docker/[email protected] | |
with: | |
context: . | |
file: ./Dockerfile | |
# platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/ppc64le,linux/s390x | |
push: true | |
tags: ${{ steps.meta.outputs.tags }} | |
labels: ${{ steps.meta.outputs.labels }} | |
platforms: linux/amd64,linux/arm64 |