forked from OWASP/threat-dragon
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* redo workflow * change tag * remove ignore path to test
- Loading branch information
1 parent
352b1d2
commit 0b15f4c
Showing
1 changed file
with
42 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,53 @@ | ||
name: Build dev image | ||
concurrency: docker | ||
name: Docker | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
paths-ignore: | ||
- '**/*.md' | ||
- 'docs/**' | ||
- '*.md' | ||
- './github/*' | ||
|
||
- ".github/**" | ||
workflow_dispatch: | ||
|
||
repository_dispatch: | ||
types: [base-image] | ||
|
||
jobs: | ||
build: | ||
strategy: | ||
fail-fast: false | ||
|
||
development: | ||
name: "Build development image" | ||
uses: rewindio/github-action-ghcr/.github/workflows/build-and-push.yml@v0 | ||
with: | ||
docker_target: development | ||
docker_image_repository: ${{ github.repository }} | ||
platforms: "linux/amd64,linux/arm64" | ||
secrets: | ||
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | ||
BUILD_ARGS: | | ||
CONTAINER_REGISTRY_PAT=${{ secrets.REWIND_GITHUB_PACKAGES_READ_ONLY_TOKEN }} | ||
CACHE_REPOSITORY=ghcr.io/${{ github.repository }} | ||
CACHE_TAG=development | ||
runs-on: ubuntu-latest | ||
|
||
env: | ||
NODE_VERSION: 22 | ||
IMAGE_NAME: ghcr.io/${{ github.repository }} | ||
|
||
# OIDC Token permissions & GitHub Packages permissions | ||
permissions: | ||
id-token: write | ||
contents: read | ||
packages: write | ||
|
||
steps: | ||
- name: Checkout | ||
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 | ||
|
||
- name: Login to GitHub Container Registry | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Build and push to GHCR | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: . | ||
push: true | ||
platforms: linux/arm64, linux/amd64 | ||
build-args: NODE_VERSION=${{ env.NODE_VERSION }} | ||
tags: ${{ env.IMAGE_NAME }}:development |