60 lines
1.8 KiB
YAML
60 lines
1.8 KiB
YAML
name: Build container
|
|
on:
|
|
push:
|
|
branches: ["main"]
|
|
pull_request:
|
|
branches: ["main"]
|
|
schedule:
|
|
- cron: "0 16 * * FRI"
|
|
|
|
jobs:
|
|
base-build:
|
|
runs-on: job-latest
|
|
steps:
|
|
- name: Clone repo
|
|
uses: actions/checkout@v4
|
|
- 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 base container
|
|
uses: docker/build-push-action@v5
|
|
with:
|
|
context: ./containers/base
|
|
file: ./containers/base/Containerfile
|
|
push: true
|
|
tags: |
|
|
git.plabble.org/job79/base:${{ github.ref_name }}
|
|
git.plabble.org/job79/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: |
|
|
git.plabble.org/job79/go:${{ github.ref_name }}
|
|
git.plabble.org/job79/go:latest
|
|
- name: Build and push infra container
|
|
uses: docker/build-push-action@v5
|
|
with:
|
|
context: ./containers/infra
|
|
file: ./containers/infra/Containerfile
|
|
push: true
|
|
tags: |
|
|
git.plabble.org/job79/infra:${{ github.ref_name }}
|
|
git.plabble.org/job79/infra:latest
|
|
- name: Build and push kali container
|
|
uses: docker/build-push-action@v5
|
|
with:
|
|
context: ./containers/kali
|
|
file: ./containers/kali/Containerfile
|
|
push: true
|
|
tags: |
|
|
git.plabble.org/job79/kali:${{ github.ref_name }}
|
|
git.plabble.org/job79/kali:latest
|