mirror of
https://github.com/GothenburgBitFactory/task-timewarrior-hook.git
synced 2025-06-26 10:54:27 +02:00
Add workflows to update Docker images for E2E tests
This commit is contained in:
parent
29479d064e
commit
808b5b0d0c
3 changed files with 185 additions and 0 deletions
73
.github/workflows/update-timew-in-docker-images.yml
vendored
Normal file
73
.github/workflows/update-timew-in-docker-images.yml
vendored
Normal file
|
@ -0,0 +1,73 @@
|
|||
name: Update Timewarrior in Docker images
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
release:
|
||||
type: choice
|
||||
description: Timewarrior release
|
||||
options:
|
||||
- develop
|
||||
- stable
|
||||
schedule:
|
||||
- cron: 0 2 * * *
|
||||
|
||||
env:
|
||||
REGISTRY: "ghcr.io"
|
||||
RELEASE: ${{ github.event.inputs.release || 'develop' }}
|
||||
|
||||
jobs:
|
||||
build-and-push-docker-images:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
id-token: write
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Install cosign
|
||||
uses: sigstore/cosign-installer@v2.8.1
|
||||
|
||||
- name: Log into registry ${{ env.REGISTRY }}
|
||||
uses: docker/login-action@v2.1.0
|
||||
with:
|
||||
registry: ${{ env.REGISTRY }}
|
||||
username: ${{ github.repository_owner }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Build and push Taskwarrior [develop]/Timewarrior [${{ env.RELEASE }}] Docker image
|
||||
id: build-and-push-develop
|
||||
uses: docker/build-push-action@v3.3.0
|
||||
with:
|
||||
context: .
|
||||
file: "./test/docker/task-timew.dockerfile"
|
||||
push: true
|
||||
build-args: |
|
||||
TASK_IMAGE=${{ env.REGISTRY }}/${{ github.repository_owner }}/task:develop
|
||||
TIMEW_IMAGE=${{ env.REGISTRY }}/${{ github.repository_owner }}/timew:${{ env.RELEASE }}
|
||||
tags: ${{ env.REGISTRY }}/${{ github.repository_owner }}/task-timew:develop-${{ env.RELEASE }}
|
||||
|
||||
- name: Sign the published Docker image
|
||||
env:
|
||||
COSIGN_EXPERIMENTAL: "true"
|
||||
run: cosign sign ${{ env.REGISTRY }}/${{ github.repository_owner }}/task-timew@${{ steps.build-and-push-develop.outputs.digest }}
|
||||
|
||||
- name: Build and push Taskwarrior [stable]/Timewarrior [${{ env.RELEASE }}] Docker image
|
||||
id: build-and-push-stable
|
||||
uses: docker/build-push-action@v3.3.0
|
||||
with:
|
||||
context: .
|
||||
file: "./test/docker/task-timew.dockerfile"
|
||||
push: true
|
||||
build-args: |
|
||||
TASK_IMAGE=${{ env.REGISTRY }}/${{ github.repository_owner }}/task:stable
|
||||
TIMEW_IMAGE=${{ env.REGISTRY }}/${{ github.repository_owner }}/timew:${{ env.RELEASE }}
|
||||
tags: ${{ env.REGISTRY }}/${{ github.repository_owner }}/task-timew:stable-${{ env.RELEASE }}
|
||||
|
||||
- name: Sign the published Docker image
|
||||
env:
|
||||
COSIGN_EXPERIMENTAL: "true"
|
||||
run: cosign sign ${{ env.REGISTRY }}/${{ github.repository_owner }}/task-timew@${{ steps.build-and-push-stable.outputs.digest }}
|
Loading…
Add table
Add a link
Reference in a new issue