Skip to content

Commit

Permalink
No using private workflow (#2)
Browse files Browse the repository at this point in the history
* redo workflow

* change tag

* remove ignore path to test
  • Loading branch information
jason-meredith-rewind authored May 30, 2024
1 parent 352b1d2 commit 0b15f4c
Showing 1 changed file with 42 additions and 22 deletions.
64 changes: 42 additions & 22 deletions .github/workflows/docker-dev.yml
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

0 comments on commit 0b15f4c

Please sign in to comment.