Skip to content

Fix: add GITHUB_TOKEN write permissions (#838) #76

Fix: add GITHUB_TOKEN write permissions (#838)

Fix: add GITHUB_TOKEN write permissions (#838) #76

Workflow file for this run

name: Publish
on:
push:
tags: ["v*"]
jobs:
push_to_registry:
name: Push Docker image to GitHub Packages
runs-on: ubuntu-latest
permissions:
packages: write
env:
DOCKER_REPO: ghcr.io/spotify/flink-operator
steps:
- name: Check out the repo
uses: actions/checkout@v4
- name: Prepare
id: prep
run: |
echo ::set-output name=image::${DOCKER_REPO}:${GITHUB_REF/refs\/tags\//}
- name: Login to Github container registry
uses: docker/[email protected]
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Push Image
uses: actions/setup-go@v5
with:
go-version: "^1.23.0"
- run: make release-manifests docker-push
env:
IMG: ${{ steps.prep.outputs.image }}
- name: Tag latest
run: docker tag ${{ steps.prep.outputs.image }} ${DOCKER_REPO}:latest
- name: Push latest
run: docker push ${DOCKER_REPO}:latest
- name: Push release manifest
uses: softprops/action-gh-release@v2
with:
files: config/deploy/flink-operator.yaml
- name: Push release manifest sharded
uses: softprops/action-gh-release@v2
with:
files: config/deploy/flink-operator-sharded.yaml