Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[#211] Updated tags to match workflow triggers. #212

Merged
merged 5 commits into from
Oct 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 9 additions & 11 deletions .github/workflows/build-deploy.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
name: build-deploy-bay-images
run-name: Build and deploy Bay images
on:
schedule:
- cron: '23 20 * * 0'
workflow_dispatch:
pull_request:
branches:
- '5.x'
pull_request_target:
types:
- closed
- opened
- synchronize
schedule:
- cron: '23 20 * * 0'
workflow_dispatch:

env:
REGISTRY: ghcr.io
Expand Down Expand Up @@ -43,14 +42,14 @@ jobs:
images: |
${{ env.REGISTRY }}/${{ github.repository }}/${{ matrix.images }}
tags: |
type=ref,event=pr
type=ref,event=branch
type=raw,value={{github.event.pull_request.head.ref}},enable=${{ github.event.pull_request.merged == true }}
type=ref,event=pr,enable=${{ github.event.pull_request.merged == false }}
type=raw,value=${{ github.event.pull_request.base.ref }},enable=${{ github.event.pull_request.merged == true }}
type=ref,event=branch,enable=${{ contains(fromJson('["schedule", "workflow_dispatch"]'), github.event_name) }}
labels: |
maintainer=Digital Victoria
repository=${{ github.repositoryUrl }}
org.opencontainers.image.authors=Digital Victoria
org.opencontainers.image.source=https://github.com/${{ github.repository }}/tree/${{ github.ref_name }}/images/${{ matrix.images }}/Dockerfile
org.opencontainers.image.source=https://github.com/${{ github.repository }}/tree/${{ (contains(fromJson('["opened","synchronize"]'), github.event.action)) && github.head_ref || github.event.action == 'closed' && github.base_ref || github.ref_name }}/images/${{ matrix.images }}/Dockerfile
org.opencontainers.image.title=${{ matrix.images }}
org.opencontainers.image.description=${{ matrix.images }} image for Bay container platform

Expand All @@ -62,5 +61,4 @@ jobs:
./gh-actions-bake.hcl
${{ steps.meta.outputs.bake-file }}
# Target the default group - probably unnecessary.
# Target the default group - branchobably unnecessary.
targets: ${{ matrix.images }}
8 changes: 2 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,12 +75,8 @@ Published images are scanned using Trivy and any CVEs identified are reported in
## Contribute
[Open an issue](https://github.com/dpc-sdp/bay) on GitHub or submit a pull request with suggested changes.

### Development Builds
GitHub Actions is configured to automatically build images for pull requests that use the branch naming convention `build/<docker_image_tag>`. This will generate the tag `build-<docker_image_tag>`.

For example

`build/2.x-updated-cli` will generate the tag `build-2-x-updated-cli` and would be referenced as `ghcr.io/dpc-sdp/bay/<bay-image>:build-2-x-updated-cli`.
### Development builds
GitHub Actions is configured via the [build-deploy workflow](.github/workflows/build-deploy.yml) to build images for pull requests when they are opened and receive updates. These images are tagged with the PR number i.e. pr-86.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍


## Support
[Digital Engagement, Department of Premier and Cabinet, Victoria, Australia](https://github.com/dpc-sdp)
Expand Down