-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #115 from lsst-dm/tickets/DM-40418
DM-40418: Release Management GitHub Action
- Loading branch information
Showing
6 changed files
with
101 additions
and
7 deletions.
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
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
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,62 @@ | ||
name: Release CI | ||
|
||
"on": | ||
push: | ||
branches-ignore: | ||
# These should always correspond to pull requests, so ignore them for | ||
# the push trigger and let them be triggered by the pull_request | ||
# trigger, avoiding running the workflow twice. This is a minor | ||
# optimization so there's no need to ensure this is comprehensive. | ||
- "dependabot/**" | ||
- "renovate/**" | ||
- "tickets/**" | ||
- "u/**" | ||
tags: | ||
- "*" | ||
pull_request: {} | ||
|
||
env: | ||
# Base tag to run tests against. | ||
BASE_TAG: "latest" | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
if: > | ||
startsWith(github.ref, 'refs/tags/') | ||
|| startsWith(github.head_ref, 'tickets/') | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Fix permissions | ||
run: chmod -R a+rwX $GITHUB_WORKSPACE | ||
|
||
- name: Login to GitHub Container Registry | ||
uses: docker/login-action@v2 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Run tests | ||
run: | | ||
docker run \ | ||
-v $GITHUB_WORKSPACE:/home/lsst/prompt_processing \ | ||
ghcr.io/${{ github.repository_owner }}/prompt-base:$BASE_TAG \ | ||
bash -c ' | ||
cd /home/lsst/prompt_processing | ||
source /opt/lsst/software/stack/loadLSST.bash | ||
setup -r . | ||
# Fix permissions; arg must be absolute path. | ||
git config --global --add safe.directory /home/lsst/prompt_processing | ||
scons' | ||
- uses: lsst-sqre/build-and-push-to-ghcr@v1 | ||
id: build | ||
with: | ||
image: ${{ github.repository }} # e.g. lsst-sqre/safirdemo | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- run: echo Pushed ghcr.io/${{ github.repository }}:${{ steps.build.outputs.tag }} |
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
File renamed without changes.
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