Skip to content

Merge pull request #38 from iits-consulting/bugfix_openstack_region #28

Merge pull request #38 from iits-consulting/bugfix_openstack_region

Merge pull request #38 from iits-consulting/bugfix_openstack_region #28

Workflow file for this run

name: Release
on:
push:
tags:
- "*"
jobs:
goreleaser:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set env
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: 1.19
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v3
with:
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker images
uses: docker/build-push-action@v3
with:
push: true
build-args: |
VERSION=${{ env.RELEASE_VERSION }}
GITHUB_REPOSITORY=${{ github.repository }}
tags: |
ghcr.io/iits-consulting/otc-auth:latest
ghcr.io/iits-consulting/otc-auth:${{ env.RELEASE_VERSION }}
aur-publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Prepare PKGBUILD
run: |
# We simply imply that ref is always a valid tag for now.
sed -e "s/__VERSION__/${GITHUB_REF_NAME}/" <PKGBUILD.template >PKGBUILD
- name: Publish AUR package
uses: KSXGitHub/[email protected]
with:
pkgname: otc-auth
pkgbuild: ./PKGBUILD
commit_username: ${{ secrets.AUR_USERNAME }}
commit_email: ${{ secrets.AUR_EMAIL }}
ssh_private_key: ${{ secrets.AUR_SSH_PRIVATE_KEY }}
commit_message: "Bump to ${{ github.github_ref_name }}"
ssh_keyscan_types: rsa,dsa,ecdsa,ed25519