Skip to content

fix: exec relative path #4

fix: exec relative path

fix: exec relative path #4

Workflow file for this run

name: Build & Push to container registry
on:
release:
types: [created]
push:
branches:
- main
pull_request:
branches:
- "**"
paths:
- "Dockerfile"
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
id: checkout
uses: actions/[email protected]
with:
lfs: true
submodules: true
#- name: Set up QEMU (We don't need QEMU, because we don't build images for platforms other than linux/amd64, which is our current native arch in our infra
# uses: docker/[email protected]
- name: Set up Docker Buildx
id: buildx
uses: docker/[email protected]
- name: Login to GitHub Container Registry
uses: docker/[email protected]
if: ${{ github.event_name != 'pull_request' }}
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Get current unix timestamp
id: timestamp
uses: release-kit/unix-timestamp@7ca717caac85efbb45f438eccf3326f54f90947f # v1
- name: Generate Docker image metadata
uses: docker/[email protected]
id: img_meta
with:
flavor: |
latest=auto
images: ghcr.io/${{ github.repository }}
tags: |
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
type=ref,event=branch
type=ref,event=branch,suffix=-${{ steps.timestamp.outputs.timestamp }}
type=sha,prefix=,suffix=,format=short
type=sha,prefix=,suffix=,format=long
- name: Build and push
id: docker_build
uses: docker/[email protected]
with:
context: ./
tags: ${{ steps.img_meta.outputs.tags }}
labels: ${{ steps.img_meta.outputs.labels }}
push: ${{ github.event_name != 'pull_request' }}
secrets: |
"GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}"
cache-from: type=gha,mode=max
cache-to: type=gha,mode=max
build-args: |
"GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}"