Build GitLab CI container (Release) #59
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: 'Build GitLab CI container (Release)' | |
on: | |
schedule: | |
- cron: "4 3 * * 5" | |
push: | |
branches: | |
- main | |
workflow_dispatch: | |
jobs: | |
build-gitlab: | |
if: ${{ github.repository == 'domjudge/domjudge-packaging' }} | |
name: Build GitLab image | |
runs-on: ubuntu-latest | |
permissions: | |
packages: write | |
contents: read | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Use the same PHP config as the contributor containers | |
run: cp -r docker-{contributor,gitlabci}/php-config | |
- name: Log in to Docker Container registry | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Extract metadata (tags, labels) for Docker | |
id: meta | |
uses: docker/metadata-action@v5 | |
with: | |
images: domjudge/gitlabci | |
- name: Build and push Docker images | |
uses: docker/build-push-action@v5 | |
with: | |
context: "./docker-gitlabci" | |
push: true | |
tags: "domjudge/gitlabci:24.04" | |
labels: ${{ steps.meta.outputs.labels }} | |