Skip to content

Commit

Permalink
actions update
Browse files Browse the repository at this point in the history
  • Loading branch information
kreynoldsf5 committed Apr 23, 2024
1 parent 6ad7a02 commit b686a4c
Show file tree
Hide file tree
Showing 4 changed files with 172 additions and 0 deletions.
57 changes: 57 additions & 0 deletions .github/workflows/base-dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: base-dev

on:
workflow_dispatch:
push:
branches:
- 'dev'
paths:
- base/**
tags:
- 'v*'
pull_request:
branches:
- 'dev'
paths:
- base/**
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}/orijen-udf-base
CONTEXT: base
jobs:
docker:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
-
name: Checkout
uses: actions/checkout@v4
-
name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
-
name: Login to Registry
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
-
name: Build and push
uses: docker/build-push-action@v5
with:
context: "{{defaultContext}}:${{env.CONTEXT}}"
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
File renamed without changes.
57 changes: 57 additions & 0 deletions .github/workflows/site-dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: site-dev

on:
workflow_dispatch:
push:
branches:
- 'dev'
paths:
- site/**
tags:
- 'v*'
pull_request:
branches:
- 'dev'
paths:
- site/**
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}/orijen-udf-site
CONTEXT: base
jobs:
docker:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
-
name: Checkout
uses: actions/checkout@v4
-
name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
-
name: Login to Registry
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
-
name: Build and push
uses: docker/build-push-action@v5
with:
context: "{{defaultContext}}:${{env.CONTEXT}}"
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
58 changes: 58 additions & 0 deletions .github/workflows/site-main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: site-main

on:
workflow_dispatch:
push:
branches:
- 'main'
paths:
- site/**
tags:
- 'v*'
pull_request:
branches:
- 'main'
paths:
- site/**
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}/orijen-udf-site
CONTEXT: base
jobs:
docker:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
-
name: Checkout
uses: actions/checkout@v4
-
name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=raw,value=latest,enable={{is_default_branch}}
-
name: Login to Registry
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
-
name: Build and push
uses: docker/build-push-action@v5
with:
context: "{{defaultContext}}:${{env.CONTEXT}}"
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

0 comments on commit b686a4c

Please sign in to comment.