Skip to content

Trialing workflows

Trialing workflows #1

Workflow file for this run

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
# GitHub recommends pinning actions to a commit SHA.
# To get a newer version, you will need to update the SHA.
# You can also reference a tag or branch, but the action may change without warning.
name: Publish image
on:
schedule:
- cron: "0 0 * * 1"
push:
branches:
- main
paths-ignore:
- "**.md"
jobs:
push_to_registry:
name: Push image to GitHub Packages
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
steps:
- name: Check out the repo
uses: actions/checkout@v4
- name: Get current date
id: date
run: echo "::set-output name=date::$(date +'%Y-%m-%d')"
- name: Log in to GitHub Docker Registry
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a
with:
registry: docker.pkg.github.com
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push image
uses: docker/build-push-action@3b5e8027fcad23fda98b2e3ac259d8d67585f671
with:
context: .
push: true
tags: |
docker.pkg.github.com/${{ github.repository }}/datblygiad:${{ github.sha }}
docker.pkg.github.com/${{ github.repository }}/datblygiad:${{ steps.date.outputs.date }}