-
Notifications
You must be signed in to change notification settings - Fork 10
Adds github actions for lint, test, and release workflows #1205
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
Merged
lorengordon
merged 7 commits into
plus3it:master
from
lorengordon:ci/use-github-actions
May 13, 2025
Merged
Changes from 6 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
d8039d0
Adds github actions for lint, test, and release workflows
lorengordon 047eba0
Updates dependabot config to track python 3.12 version
lorengordon 84cdbb0
Adds workflow to publish container image to dockerhub and ghcr
lorengordon 0dc1c0a
Mounts token as docker secret
lorengordon 1585717
Removes travis-ci config
lorengordon b90d59c
Bumps version to 0.27.0
lorengordon 2c3e990
Update .github/workflows/lint.yml
lorengordon 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 hidden or 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 hidden or 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 hidden or 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,85 @@ | ||
| name: Build, test, and publish container image | ||
|
|
||
| on: | ||
| # Run pull requests against the default branch | ||
| pull_request: | ||
| branches: [master] | ||
|
|
||
| # Run on push to default branch | ||
| push: | ||
| branches: [master] | ||
|
|
||
| # Run when a release is created | ||
| release: | ||
| types: [released] | ||
|
|
||
| jobs: | ||
| build: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Clone this git repository | ||
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 | ||
|
|
||
| - name: Docker meta | ||
| if: github.event_name != 'pull_request' | ||
| id: meta | ||
| uses: docker/metadata-action@902fa8ec7d6ecbf8d84d538b9b233a880e428804 | ||
| with: | ||
| # list of Docker images to use as base name for tags | ||
| images: | | ||
| plus3it/tardigrade-ci | ||
| ghcr.io/plus3it/tardigrade-ci | ||
| flavor: | | ||
| latest=false | ||
| # generate Docker tags based on the following events/attributes | ||
| tags: | | ||
| # set latest tag for default branch | ||
| type=raw,value=latest,enable={{is_default_branch}} | ||
| # set version tags for releases | ||
| type=semver,pattern={{version}} | ||
| type=semver,pattern={{major}}.{{minor}} | ||
| type=semver,pattern={{major}},enable=${{ !startsWith(github.ref, 'refs/tags/v0.') }} | ||
|
|
||
| - name: Login to Docker Hub | ||
| if: github.event_name != 'pull_request' | ||
| uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 | ||
| with: | ||
| username: ${{ vars.DOCKERHUB_USERNAME }} | ||
| password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
|
|
||
| - name: Login to GitHub Container Registry | ||
| if: github.event_name != 'pull_request' | ||
| uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 | ||
| with: | ||
| registry: ghcr.io | ||
| username: ${{ github.repository_owner }} | ||
| password: ${{ secrets.GITHUB_TOKEN }} | ||
|
|
||
| - name: Set up QEMU | ||
| uses: docker/setup-qemu-action@29109295f81e9208d7d86ff1c6c12d2833863392 | ||
|
|
||
| - name: Set up Docker Buildx | ||
| uses: docker/setup-buildx-action@b5ca514318bd6ebac0fb2aedd5d36ec1b5c232a2 | ||
|
|
||
| - name: Build and export | ||
| uses: docker/build-push-action@14487ce63c7a62a4a324b0bfb37086795e31c6c1 | ||
| with: | ||
| context: . | ||
| load: true | ||
| tags: plus3it/tardigrade-ci:test | ||
| secrets: | | ||
| "GITHUB_ACCESS_TOKEN=${{ secrets.GITHUB_TOKEN }}" | ||
|
|
||
| - name: Run bats tests | ||
| if: github.event_name == 'pull_request' | ||
| run: docker run --rm -e "GITHUB_ACCESS_TOKEN=${{ secrets.GITHUB_TOKEN }}" plus3it/tardigrade-ci:test bats/test | ||
|
|
||
| - name: Push to registries | ||
| if: github.event_name != 'pull_request' | ||
| uses: docker/build-push-action@14487ce63c7a62a4a324b0bfb37086795e31c6c1 | ||
| with: | ||
| push: true | ||
| tags: ${{ steps.meta.outputs.tags }} | ||
| labels: ${{ steps.meta.outputs.labels }} | ||
| secrets: | | ||
| "GITHUB_ACCESS_TOKEN=${{ secrets.GH_READONLY_TOKEN }}" |
This file contains hidden or 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,22 @@ | ||
| name: Run lint and static analyis checks | ||
| on: | ||
| pull_request: | ||
|
|
||
| concurrency: | ||
| group: lint-${{ github.head_ref || github.ref }} | ||
| cancel-in-progress: true | ||
|
|
||
| jobs: | ||
| lint: | ||
| runs-on: ubuntu-latest | ||
| env: | ||
| GITHUB_ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| steps: | ||
| - name: Clone this git repository | ||
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 | ||
|
|
||
| - name: Install lint dependencies | ||
| run: make lint/install | ||
|
|
||
| - name: Run lint checks | ||
| run: make -o docs/lint lint | ||
This file contains hidden or 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,19 @@ | ||
| name: Create GitHub Release | ||
|
|
||
| on: | ||
| # Run on demand | ||
| workflow_dispatch: | ||
|
|
||
| # Run on push to default branch when .bumpversion.cfg version is updated | ||
| push: | ||
| branches: | ||
| - main | ||
| - master | ||
| paths: | ||
| - .bumpversion.cfg | ||
|
|
||
| jobs: | ||
| release: | ||
| uses: plus3it/actions-workflows/.github/workflows/release.yml@00bdf2c02c2bb252dc7ba7f74816ac8359aa6693 | ||
| secrets: | ||
| release-token: ${{ secrets.GH_RELEASES_TOKEN }} |
This file was deleted.
Oops, something went wrong.
This file contains hidden or 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 hidden or 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
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.
Uh oh!
There was an error while loading. Please reload this page.