This repository has been archived by the owner on Apr 26, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Push complement image to a docker registry #14509
Merged
DMRobertson
merged 16 commits into
matrix-org:develop
from
michaelkaye:michaelk/push_complement_image
Nov 28, 2022
Merged
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
05d3ca1
GHA workflow to build complement images of key branches.
michaelkaye 240087e
Add changelog.d
michaelkaye d0a007f
GHA workflow to build complement images of key branches.
michaelkaye 5fdeac3
Add changelog.d
michaelkaye 7f55ed7
Update complement.yml
michaelkaye 22f1b7e
Merge branch 'develop' into michaelk/push_complement_image
michaelkaye c357525
Update complement.yml
michaelkaye 3b2348d
Rename file to be more obvious
michaelkaye b5f707b
Merge branch 'michaelk/push_complement_image' of github.com:michaelka…
michaelkaye 45c5fd3
Merge did not go correctly.
michaelkaye 5174c34
Setup 5am builds of develop, limit to one run at once.
michaelkaye ac00139
Fix crontab---run once at 5AM, not very minute between 5 and 6
DMRobertson 22abe0d
Fix cron syntax again?
DMRobertson 7daa053
Tweak workflow name
608e814
Allow manual debug runs
95c6943
Tweak indentation
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
# This task does not run complement tests, see tests.yaml instead. | ||
# This task does not build docker images for synapse for use on docker hub, see docker.yaml instead | ||
|
||
name: Store complement-synapse image in ghcr.io | ||
on: | ||
push: | ||
branches: [ "master" ] | ||
schedule: | ||
- cron: '0 5 * * *' | ||
workflow_dispatch: | ||
inputs: | ||
branch: | ||
required: true | ||
default: 'develop' | ||
type: choice | ||
options: | ||
- develop | ||
- master | ||
|
||
# Only run this action once per pull request/branch; restart if a new commit arrives. | ||
# C.f. https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#concurrency | ||
# and https://docs.github.com/en/actions/reference/context-and-expression-syntax-for-github-actions#github-context | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
build: | ||
name: Build and push complement image | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
packages: write | ||
steps: | ||
- name: Checkout specific branch (debug build) | ||
uses: actions/checkout@v3 | ||
if: 'github.event.type == "workflow_dispatch"' | ||
with: | ||
ref: ${{ inputs.branch }} | ||
- name: Checkout clean copy of develop (scheduled build) | ||
uses: actions/checkout@v3 | ||
if: 'github.event.type == "schedule"' | ||
with: | ||
ref: develop | ||
- name: Checkout clean copy of master (on-push) | ||
uses: actions/checkout@v3 | ||
if: 'github.event.type == "push"' | ||
with: | ||
ref: master | ||
- name: Login to registry | ||
uses: docker/login-action@v1 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Work out labels for complement image | ||
id: meta | ||
uses: docker/metadata-action@v1 | ||
with: | ||
images: ghcr.io/${{ github.repository }}/complement-synapse | ||
- name: Build complement image | ||
run: scripts-dev/complement.sh --build-only | ||
- name: Tag and push generated image | ||
run: | | ||
for TAG in ${{ steps.meta.outputs.tags }}; do | ||
docker tag complement-synapse:latest $TAG | ||
docker push $TAG | ||
done |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Push complement-synapse docker images to ghcr.io repository. |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if
master
should point to latest anddevelop
should have a different tag?