This repository has been archived by the owner on Feb 21, 2024. It is now read-only.
MariaDB 10.7 #12
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: "MariaDB 10.7" | |
on: | |
schedule: | |
- cron: '35 4 * * 3' | |
push: | |
branches: [ "main" ] | |
paths: | |
- "10.7/**" | |
pull_request: | |
branches: [ "main" ] | |
paths: | |
- "10.7/**" | |
env: | |
# The default repo env will be 'ComputeStacks'; uppercase is not allowed. | |
GH_REPO: computestacks/cs-docker-maria-backup | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
packages: write | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Setup Docker buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Log into Github Registry | |
if: github.event_name != 'pull_request' | |
uses: docker/login-action@v2 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Log into DockerHub | |
if: github.event_name != 'pull_request' | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Build and push | |
id: build-and-push | |
uses: docker/build-push-action@v3 | |
with: | |
context: 10.7/ | |
push: ${{ github.event_name != 'pull_request' }} | |
tags: | | |
cmptstks/mariadb-backup:10.7 | |
ghcr.io/${{ env.GH_REPO }}:10.7 | |
cache-from: type=gha | |
cache-to: type=gha,mode=max |