This commit is contained in:
@@ -1,28 +1,43 @@
|
|||||||
name: Build container
|
name: Build container
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
|
pull_request:
|
||||||
|
branches: ["main"]
|
||||||
schedule:
|
schedule:
|
||||||
- cron: "0 16 * * FRI"
|
- cron: "0 16 * * FRI"
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: job-latest
|
runs-on: job-latest
|
||||||
if: gitea.ref == 'refs/heads/main'
|
|
||||||
steps:
|
steps:
|
||||||
- name: Clone repo
|
- name: Clone repo
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
- name: Setup Docker Buildx
|
- name: Setup Docker Buildx
|
||||||
uses: https://github.com/docker/setup-buildx-action@v3
|
uses: docker/setup-buildx-action@v3
|
||||||
- name: Login to Registry
|
- name: Login to Registry
|
||||||
uses: docker/login-action@v3
|
uses: docker/login-action@v3
|
||||||
with:
|
with:
|
||||||
registry: git.plabble.org
|
registry: git.plabble.org
|
||||||
username: ${{ secrets.REGISTRY_USERNAME }}
|
username: ${{ secrets.REGISTRY_USERNAME }}
|
||||||
password: ${{ secrets.REGISTRY_TOKEN }}
|
password: ${{ secrets.REGISTRY_TOKEN }}
|
||||||
- name: Build and push Docker image
|
- name: Build and push base container
|
||||||
uses: https://github.com/docker/build-push-action@v5
|
uses: docker/build-push-action@v5
|
||||||
with:
|
with:
|
||||||
context: .
|
context: ./containers/base
|
||||||
file: ./Containerfile
|
file: ./containers/base/Containerfile
|
||||||
push: true
|
push: true
|
||||||
tags: git.plabble.org/job79/devcontainer:latest
|
tags: ghcr.io/${{ github.actor }}/base:latest
|
||||||
|
- name: Build and push go container
|
||||||
|
uses: docker/build-push-action@v5
|
||||||
|
with:
|
||||||
|
context: ./containers/go
|
||||||
|
file: ./containers/go/Containerfile
|
||||||
|
push: true
|
||||||
|
tags: ghcr.io/${{ github.actor }}/go:latest
|
||||||
|
- name: Build and push kube container
|
||||||
|
uses: docker/build-push-action@v5
|
||||||
|
with:
|
||||||
|
context: ./containers/kube
|
||||||
|
file: ./containers/kube/Containerfile
|
||||||
|
push: true
|
||||||
|
tags: ghcr.io/${{ github.actor }}/kube:latest
|
||||||
|
|||||||
Reference in New Issue
Block a user