Skip to content

fixed e2e test failing on main branch as config get is allowed by operator users #415

fixed e2e test failing on main branch as config get is allowed by operator users

fixed e2e test failing on main branch as config get is allowed by operator users #415

Workflow file for this run

---
name: Publish
on:
pull_request:
push:
branches:
- 'main'
tags:
- 'v*'
permissions:
contents: read
packages: write
jobs:
publish:
name: Publish container images
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- name: Reclaim disk space
run: |
docker image prune --force --all
sudo rm -rf /usr/share/dotnet
sudo rm -rf /usr/local/lib/android
- name: Install Go
uses: actions/setup-go@924ae3a1cded613372ab5595356fb5720e22ba16 # v6.5.0
with:
go-version-file: .go-version
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@d7f5e7f509e45cec5c76c4d5afdd7de93d0b3df5 # v4.1.0
- name: Login to ghcr.io
if: github.event_name != 'pull_request'
uses: docker/login-action@650006c6eb7dba73a995cc03b0b2d7f5ca915bee # v4.2.0
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata
id: meta
uses: docker/metadata-action@80c7e94dd9b9319bd5eb7a0e0fe9291e23a2a2e9 # v6.1.0
with:
images: ghcr.io/${{ github.repository }}
tags: |
# Tag with branch name
type=ref,event=branch
# Tag with PR number
type=ref,event=pr
# Tag with semver from git tag
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern=v{{version}}
type=semver,pattern=v{{major}}.{{minor}}
# Tag with short SHA
type=sha,prefix=
- name: Get version info
id: version
run: |
if [[ "$GITHUB_REF_TYPE" == "tag" ]]; then
echo "ldflags=$(make print-version-ldflags VERSION=${GITHUB_REF_NAME} BRANCH=${GITHUB_REF_NAME})" | tee -a "$GITHUB_OUTPUT"
else
echo "ldflags=$(make print-version-ldflags BRANCH=${GITHUB_REF_NAME})" | tee -a "$GITHUB_OUTPUT"
fi
- name: Build and publish container
id: publish
uses: docker/build-push-action@53b7df96c91f9c12dcc8a07bcb9ccacbed38856a # v7.3.0
with:
context: .
file: ./Dockerfile
build-args: VERSION_LDFLAGS=${{ steps.version.outputs.ldflags }}
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
platforms: linux/amd64,linux/arm64