Skip to content
This repository has been archived by the owner on Aug 14, 2024. It is now read-only.

Commit

Permalink
ci: Separate edge and release versions
Browse files Browse the repository at this point in the history
  • Loading branch information
bjw-s committed Dec 5, 2023
1 parent 1b9217d commit d259a97
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 6 deletions.
55 changes: 55 additions & 0 deletions .github/workflows/build-edge.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
---
name: Build and push rolling tag

on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_dispatch:

permissions:
contents: write
packages: write

jobs:
build_container:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # 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 image registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: |
ghcr.io/${{ github.repository_owner }}/k8s-ycl
tags: |
type=raw,value=rolling
type=ref,event=branch
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile
platforms: linux/amd64,linux/arm64
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
---
name: Build and release application
name: Build and release

on:
push:
branches:
- "main"
- "development"
tags:
- "v*"
workflow_dispatch:
Expand Down Expand Up @@ -45,8 +42,6 @@ jobs:
images: |
ghcr.io/${{ github.repository_owner }}/k8s-ycl
tags: |
type=raw,value=rolling,enable=${{ github.ref == format('refs/heads/{0}', 'main') }}
type=ref,event=branch
type=ref,event=tag
- name: Build and push
Expand Down

0 comments on commit d259a97

Please sign in to comment.