Update rbac config #5
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: Release | |
on: { push: { branches: [main] } } | |
concurrency: | |
group: 'release' | |
permissions: | |
contents: write | |
packages: write | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
outputs: | |
tag: ${{ steps.setup.outputs.tag }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Generate tag | |
id: setup | |
run: | | |
echo "tag=v$(git show -s --format=%ct)" >> $GITHUB_OUTPUT | |
container: | |
runs-on: ubuntu-20.04 | |
needs: [release] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Authenticate with ghcr | |
run: | | |
echo '${{ secrets.GITHUB_TOKEN }}' | docker login ghcr.io -u ${{ github.repository_owner }} --password-stdin | |
- name: Publish container | |
run: | | |
make docker-build docker-push IMG=ghcr.io/infrabits/namespace-secrets-patcher:${{ needs.release.outputs.tag }} | |
tag: | |
runs-on: ubuntu-20.04 | |
needs: [release, container] | |
steps: | |
- name: Create GitHub release | |
uses: actions/github-script@v7 | |
with: | |
script: | | |
await github.rest.repos.createRelease({ | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
name: '${{ needs.release.outputs.tag }}', | |
tag_name: '${{ needs.release.outputs.tag }}', | |
generate_release_notes: true, | |
}) |