Skip to content

Merge pull request #78 from DazWilkin/dependabot/go_modules/github.co… #35

Merge pull request #78 from DazWilkin/dependabot/go_modules/github.co…

Merge pull request #78 from DazWilkin/dependabot/go_modules/github.co… #35

Workflow file for this run

name: build
on:
push:
branches:
- master
jobs:
gcp-oidc-token-proxy:
name: gcp-oidc-token-proxy
runs-on: ubuntu-latest
env:
REPO: dazwilkin/gcp-oidc-token-proxy
steps:
- name: checkout
uses: actions/checkout@v4
- name: setup
uses: docker/setup-buildx-action@v3
- name: login
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GHCR }}
- name: Get kernel version
run: echo "VERSION=$(uname --kernel-release)" >> ${GITHUB_ENV}
- name: build-push
uses: docker/build-push-action@v6
with:
context: .
file: ./Dockerfile
build-args: |
VERSION=${{ env.VERSION }}
COMMIT=${{ github.sha }}
tags: ghcr.io/${{ env.REPO }}:${{ github.sha }}
push: true
- name: revise occurrences of the image
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Actions"
for FILENAME in "./docker-compose.yml" "./README.md" "./kubernetes/deployment.yml"
do
sed \
--in-place \
"s|ghcr.io/${{ env.REPO }}:[0-9a-f]\{40\}|ghcr.io/${{ env.REPO }}:${{ github.sha }}|g" \
${FILENAME}
git add ${FILENAME}
done
git commit --message "GitHub Actions update image references"
git push origin master