ci: update STALE-ISSUES workflow from global .github repo (#51) #32
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-verify-package | |
on: | |
push: | |
paths-ignore: | |
#- '.github/**' | |
- '.gitignore' | |
- 'LICENSE' | |
- '*.md' | |
pull_request: | |
paths-ignore: | |
- '.github/**' | |
- '.gitignore' | |
- 'LICENSE' | |
- '*.md' | |
jobs: | |
build-verify-package: | |
runs-on: ubuntu-latest | |
environment: Build | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v3 | |
- name: Set environment for branch | |
run: | | |
set -x | |
if [[ $GITHUB_REF == 'refs/heads/master' ]]; then | |
echo "IMAGE_TAG=nightly" >> "$GITHUB_ENV" | |
echo "PACKAGE_IMAGE=true" >> "$GITHUB_ENV" | |
elif [[ $GITHUB_REF == "refs/tags/$GITHUB_REF_NAME" ]]; then | |
echo "IMAGE_TAG=$GITHUB_REF_NAME" >> "$GITHUB_ENV" | |
echo "PACKAGE_IMAGE=true" >> "$GITHUB_ENV" | |
else | |
echo "PACKAGE_IMAGE=false" >> "$GITHUB_ENV" | |
fi | |
- name: Set up QEMU | |
if: github.repository_owner == 'microcks' && env.PACKAGE_IMAGE == 'true' | |
uses: docker/setup-qemu-action@v2 | |
- name: Set up Docker Buildx | |
if: github.repository_owner == 'microcks' && env.PACKAGE_IMAGE == 'true' | |
uses: docker/setup-buildx-action@v2 | |
- name: Login to Quay Container Registry | |
if: github.repository_owner == 'microcks' && env.PACKAGE_IMAGE == 'true' | |
uses: docker/login-action@v2 | |
with: | |
registry: quay.io | |
username: ${{ secrets.QUAY_USERNAME }} | |
password: ${{ secrets.QUAY_PASSWORD }} | |
- name: Build and push | |
if: github.repository_owner == 'microcks' && env.PACKAGE_IMAGE == 'true' | |
uses: docker/build-push-action@v4 | |
with: | |
context: . | |
platforms: linux/amd64 #,linux/arm64 | |
push: true | |
tags: | | |
quay.io/microcks/microcks-hub:${{ env.IMAGE_TAG }} | |