other: Add packages:write to GH job #4
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: Worshop Release | |
on: | |
push: | |
tags: | |
- 'v[0-9]+.[0-9]+.[0-9]+' | |
env: | |
CONTAINER_IMAGE: ghcr.io/embesozzi/${{github.event.repository.name}} | |
jobs: | |
build-upload-release: | |
runs-on: ubuntu-latest | |
permissions: | |
id-token: write | |
contents: write | |
packages: write | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Get version from tag | |
id: version | |
run: echo ::set-output name=number::$(echo $GITHUB_REF | cut -d / -f 3 | cut -d / -f 3 | sed -e 's/^v//') | |
- name: docker build & push | |
run: | | |
docker build --build-arg API_GATEWAY_VERSION=3.7.0-debian --build-arg PLUGIN_OPENFGA_VERSION=${{ steps.version.outputs.number }} -t ${{env.CONTAINER_IMAGE}} . | |
docker build . -t ${{env.CONTAINER_IMAGE}}:${{ steps.version.outputs.number }} -t ${{env.CONTAINER_IMAGE}}:latest | |
docker push ${{env.CONTAINER_IMAGE}}:${{ steps.version.outputs.number }} | |
docker push ${{env.CONTAINER_IMAGE}}:latest | |
- name: Create changelog text | |
id: changelog | |
uses: loopwerk/tag-changelog@v1 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
exclude_types: other,doc,chore | |
config_file: .github/tag-changelog-config.js | |
- name: Parse changelog markdown to HTML | |
id: changelog-html | |
uses: lifepal/[email protected] | |
with: | |
text: ${{ steps.changelog.outputs.changelog }} | |
- name: Release to GitHub releasesc | |
uses: softprops/action-gh-release@v1 | |
with: | |
body: ${{ steps.changelog.outputs.changes }} | |
fail_on_unmatched_files: true | |
tag_name: ${{ steps.version.outputs.number }} |