Files
kube-zap2xml/.github/workflows/nightly-release.yaml
Jef LeCompte e31071bda8 feat: update docker and pipeline
- Add workflow to publish to GHCR
- Add workflow to build Docker image
- Add zap2xmlrc config example
- Update Dockerfile to run continuously
2021-04-24 16:17:46 -04:00

24 lines
777 B
YAML

name: Nightly Release
on:
schedule:
- cron: '0 0 * * *'
workflow_dispatch: {}
jobs:
build-release:
name: Build and release Docker image
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Login into GitHub Container Registry
run: echo ${{ secrets.CR_PAT }} | docker login ghcr.io -u $GITHUB_ACTOR --password-stdin
- name: Build Docker image
run: |
docker build \
-t "ghcr.io/${GITHUB_REPOSITORY}:${GITHUB_SHA:0:7}" \
-t "ghcr.io/${GITHUB_REPOSITORY}:nightly" .
- name: Release Docker image
run: |
docker push "ghcr.io/${GITHUB_REPOSITORY}:${GITHUB_SHA:0:7}"
docker push "ghcr.io/${GITHUB_REPOSITORY}:nightly"