Skip to content

Update token permissions #27

Update token permissions

Update token permissions #27

Workflow file for this run

name: Docker Image CI
on:
push:
branches:
- main
paths:
- 'versions.env'
env:
REGISTRY: ghcr.io
IMAGE_NAME: k9s-web
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
jobs:
build:
permissions:
packages: write
contents: write
pull-requests: read
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4
- uses: rymndhng/release-on-push-action@master
id: release
with:
bump_version_scheme: minor
use_github_release_notes: true
- name: Set build args env
run: |
set -a
source versions.env
set +a
echo TTYD_VERSION=$TTYD_VERSION >>${GITHUB_ENV}
echo K9S_VERSION=$K9S_VERSION >>${GITHUB_ENV}
- name: Log in to the Container registry
uses: docker/login-action@d910b140723c904c9e74efef5dc6af05d5143104
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: lowercase repo owner
run: |
REPO_OWNER=`echo ${{ github.actor }} | tr '[:upper:]' '[:lower:]'`
echo REPO_OWNER=$REPO_OWNER >>${GITHUB_ENV}
- name: Build and push Docker image
uses: docker/build-push-action@729f7f49266dec5e72fe7339273d3f7e65abacd7
with:
context: .
push: true
tags: ${{ env.REGISTRY }}/${{ env.REPO_OWNER }}/${{ env.IMAGE_NAME }}:${{ steps.release.outputs.tag_name }}
addLatest: true
build-args: |
TTYD_VERSION=${{ env.TTYD_VERSION }}
K9S_VERSION=${{ env.K9S_VERSION }}