Skip to content

Commit

Permalink
experiment with old pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
SciLor committed Sep 3, 2024
1 parent e9af909 commit 614a289
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 13 deletions.
29 changes: 25 additions & 4 deletions .github/workflows/publish_docker_matrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,7 @@ on:
workflow_call:
inputs:
tcw_commit_hash:
description: "Commit hash from the teddycloud_web build job"
type: string
required: false
default: "HEAD"

push:
branches:
Expand All @@ -18,18 +15,42 @@ on:
- tc_nightly*
- tc_v*.*.*
pull_request:
branches: ["master", "develop"]
branches:
- master
- develop

jobs:
test_commit_hash:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
ref: ${{ inputs.tcw_commit_hash }}

- name: Verify commit hash
if: inputs.tcw_commit_hash != ''
run: |
COMMIT_HASH=$(git rev-parse HEAD)
if [ "$COMMIT_HASH" != "${{ inputs.tcw_commit_hash }}" ]; then
echo "Error: Checked out commit hash ($COMMIT_HASH) does not match the expected hash (${{ inputs.tcw_commit_hash }})."
exit 1
else
echo "Commit hash verified: $COMMIT_HASH"
fi
debian:
needs: test_commit_hash
uses: ./.github/workflows/publish_docker_matrix_debian.yml
with:
tcw_commit_hash: ${{ inputs.tcw_commit_hash }}
ubuntu:
needs: test_commit_hash
uses: ./.github/workflows/publish_docker_matrix_ubuntu.yml
with:
tcw_commit_hash: ${{ inputs.tcw_commit_hash }}
alpine:
needs: test_commit_hash
uses: ./.github/workflows/publish_docker_matrix_alpine.yml
with:
tcw_commit_hash: ${{ inputs.tcw_commit_hash }}
4 changes: 1 addition & 3 deletions .github/workflows/publish_docker_matrix_alpine.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ on:
tcw_commit_hash:
description: "Commit hash from the teddycloud_web build job"
type: string
required: false
default: "HEAD"

# permissions are needed if pushing to ghcr.io
permissions:
Expand Down Expand Up @@ -37,7 +35,7 @@ jobs:
- uses: actions/checkout@v4
with:
submodules: recursive
ref: ${{ inputs.tcw_commit_hash }}
ref: ${{ inputs.tcw_commit_hash || 'HEAD' }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/publish_docker_matrix_debian.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ on:
tcw_commit_hash:
description: "Commit hash from the teddycloud_web build job"
type: string
required: false
default: "HEAD"

# permissions are needed if pushing to ghcr.io
permissions:
Expand Down Expand Up @@ -36,7 +34,7 @@ jobs:
- uses: actions/checkout@v4
with:
submodules: recursive
ref: ${{ inputs.tcw_commit_hash }}
ref: ${{ inputs.tcw_commit_hash || 'HEAD' }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/publish_docker_matrix_ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ on:
tcw_commit_hash:
description: "Commit hash from the teddycloud_web build job"
type: string
required: false
default: "HEAD"

# permissions are needed if pushing to ghcr.io
permissions:
Expand All @@ -35,7 +33,7 @@ jobs:
- uses: actions/checkout@v4
with:
submodules: recursive
ref: ${{ inputs.tcw_commit_hash }}
ref: ${{ inputs.tcw_commit_hash || 'HEAD' }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
Expand Down

0 comments on commit 614a289

Please sign in to comment.