Skip to content

Commit

Permalink
Add kaniko-multiarch.yaml workflow and update .gitignore (expected fa…
Browse files Browse the repository at this point in the history
…ilure)
  • Loading branch information
ngeorger committed Mar 23, 2024
1 parent 88c220c commit 1d2c650
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 1 deletion.
55 changes: 55 additions & 0 deletions .github/workflows/kaniko-multiarch.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Build with kaniko container

on:
push:
branches:
- kaniko
# push:
# tags:
# - 'v*'
# pull_request:
# branches:
# - main
workflow_dispatch:
inputs:
manual-tag:
description: 'Manual Tag'
required: false
default: 'main'
type: string
ghost_version:
description: 'Ghost version'
required: false
default: '5.80.2'
type: string

permissions:
contents: read
packages: write
id-token: write # needed for signing the images with GitHub OIDC Token

jobs:
kaniko:
runs-on: ubuntu-latest
env:
DOCKER_USER: ${{ vars.DOCKER_USER }}
DOCKER_PASS: ${{ secrets.DOCKER_PASS }}
GITHUB_USER: ${{ github.actor }}
GITHUB_TOKEN: ${{ github.token }}
PROJECT: ${{ github.repository_owner }}

container:
image: gcr.io/kaniko-project/executor:debug
options: --entrypoint ["dockerfile=<path to Dockerfile within the build context>", "context=dir://<path to build context>", "destination=<gcr.io/$PROJECT/$IMAGE:$TAG>"]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Workdir
run: |
cp ./Dockerfile /workspace/Dockerfile
working-directory: ${{ github.workspace }}

- name: Credentials as docker config
run: |
echo "{\"auths\":{\"docker.pkg.github.com\":{\"username\":\"${DOCKER_USER}\",\"password\":\"${DOCKER_PASS}\"},\"ghcr.io\":{\"username\":\"${GITHUB_USER}\",\"password\":\"${GITHUB_TOKEN}\"}}}" > /kaniko/.docker/config.json
working-directory: /workspace
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ kubernetes-deployment/config.json
dockermount/

test/
**.local
**.local.**
ghost-upstream/
content/
config.production.json
Expand All @@ -114,3 +114,6 @@ ghost-local.db
.monokle
.monokle
docker-compose.yml
trustr-production-promote.yaml
trustr-staging-build-monorepo.yaml
trustr-staging-build-not-monorepo.yaml

0 comments on commit 1d2c650

Please sign in to comment.