Skip to content

chore: upgrade actions #6

chore: upgrade actions

chore: upgrade actions #6

Workflow file for this run

name: Build
on:
push:
branches:
- master
tags:
- "v[0-9]+.[0-9]+.[0-9]+"
env:
IMAGE_NAME: ghcr.io/hoverkraft-tech/helm-push
PLATFORMS: linux/amd64
jobs:
push:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
# - uses: docker/login-action@v1
# with:
# registry: ghcr.io
# username: ${{ github.repository_owner }}
# password: ${{ secrets.CR_PAT }}
- name: Determine tag or commit
uses: haya14busa/action-cond@v1
id: refortag
with:
cond: ${{ startsWith(github.ref, 'refs/tags/') }}
if_true: ${{ github.ref }}
if_false: latest
- name: Determine image tag
id: imagetag
run: echo "::set-output name=value::${TAG_OR_BRANCH##*/}"
env:
TAG_OR_BRANCH: ${{ steps.refortag.outputs.value }}
- name: Build and push image
uses: docker/build-push-action@v5
with:
tags: ${{ env.IMAGE_NAME }}:${{ steps.imagetag.outputs.value }}
file: Dockerfile
platforms: ${{ env.PLATFORMS }}
secrets: |
"github_token=${{ secrets.GITHUB_TOKEN }}"
push: true