Skip to content

Commit

Permalink
fix(again): build docker containers on release
Browse files Browse the repository at this point in the history
Signed-off-by: AtomicFS <[email protected]>
  • Loading branch information
AtomicFS committed Jul 11, 2024
1 parent 35ed1fe commit 2d33a7e
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/docker-build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ jobs:
run: pip install -r ./.dagger-ci/daggerci/requirements.txt
- name: Run dagger pipeline
run: |
if [[ "${GITHUB_EVENT_NAME}" == 'release' ]] || [[ "${GITHUB_REF}" == *'main' ]]; then
if [[ "${GITHUB_EVENT_NAME}" == 'release' ]] || [[ "${GITHUB_REF}" == *'main' ]] || [[ "${GITHUB_REF_TYPE}" == 'tag' ]]; then
echo "Enable publishing"
python .dagger-ci/daggerci/main.py -d ${{ matrix.dockerfile }} --publish
else
Expand Down
15 changes: 14 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,20 @@ jobs:
actions: write
contents: read
packages: write
needs: ['release-golang']
if: startsWith(github.event.pull_request.title, 'Release:') && github.event.pull_request.merged == true
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-tags: true

- name: Get tag of current commit
id: get_version
run: |
echo "version=$(git tag --points-at HEAD)" >> "${GITHUB_OUTPUT}"
- name: Trigger dagger workflow
uses: actions/github-script@v7
with:
Expand All @@ -95,7 +108,7 @@ jobs:
owner: context.repo.owner,
repo: context.repo.repo,
workflow_id: 'docker-build-and-test.yml',
ref: context.ref,
ref: "${{ steps.get_version.outputs.version }}",
})
console.log(result);
} catch(error) {
Expand Down

0 comments on commit 2d33a7e

Please sign in to comment.