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