Skip to content

ci

ci #1141

Workflow file for this run

name: ci
on:
workflow_dispatch:
schedule:
- cron: '0 5 * * *' # everyday at 5am
push:
branches:
- '**'
tags:
- 'v*.*.*'
jobs:
docker:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v2
-
name: Get current date
id: date
run: echo "::set-output name=date::$(date +'%Y-%m-%d')"
-
name: Bump version and push tag
id: tag_version
uses: mathieudutour/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
custom_tag: ${{ steps.date.outputs.date }}
tag_prefix: ''
continue-on-error: true
-
name: Docker meta
id: meta
uses: docker/metadata-action@v3
with:
# list of Docker images to use as base name for tags
images: |
ghcr.io/chris-softrams/docker
# generate Docker tags based on the following events/attributes
tags: |
type=schedule
type=ref,event=branch
-
name: Set up QEMU
uses: docker/setup-qemu-action@v1
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
-
name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
-
name: Build and push
uses: docker/build-push-action@v2
with:
context: .
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
-
name: Keep scheduled workflows alive
uses: gautamkrishnar/keepalive-workflow@master
with:
committer_username: keepalive-bot
committer_email: keepalive-bot@keepalive-bot
commit_message: Automated commit by Keepalive Workflow to keep the repository active
time_elapsed: 50