nightly schedule for docker images #4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Docker Pub | |
schedule: | |
- cron: '00 06 * * 1-5' | |
jobs: | |
build: | |
name: Buid and push Docker image to GitHub Container registry | |
runs-on: ubuntu-latest | |
permissions: | |
packages: write | |
contents: read | |
steps: | |
- name: Checkout the repository | |
uses: actions/checkout@v2 | |
- name: Build Meta | |
run: echo "::set-output name=dtag::ghcr.io/barelyhuman/goblin:nightly" | |
id: meta | |
- name: Login to GitHub Container registry | |
uses: docker/login-action@v1 | |
env: | |
GITHUB_USER: ${{ github.actor }} | |
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} | |
with: | |
registry: ghcr.io | |
username: $GITHUB_USER | |
password: ${{ secrets.GH_TOKEN }} | |
- name: Build and Push Docker Image | |
env: | |
REGISTRY: ghcr.io | |
OWNER: barelyhuman | |
IMAGE_NAME: ${{ github.repository }} | |
uses: docker/build-push-action@v2 | |
with: | |
context: . | |
file: Dockerfile | |
push: true | |
tags: ${{ steps.meta.outputs.dtag }} |