-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add CI job to publish k6packager Docker image to GHCR
- Loading branch information
Ivan Mirić
committed
Apr 9, 2021
1 parent
90da634
commit 316efaf
Showing
3 changed files
with
36 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: k6packager | ||
on: | ||
# Enable manually triggering this workflow via the API or web UI | ||
workflow_dispatch: | ||
schedule: | ||
- cron: '0 0 * * 0' # weekly (Sundays at 00:00) | ||
|
||
defaults: | ||
run: | ||
shell: bash | ||
|
||
jobs: | ||
publish-packager: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
with: | ||
ref: ci/s3-package-repos | ||
- name: Build | ||
run: | | ||
cd packaging | ||
docker-compose build packager | ||
- name: Publish | ||
env: | ||
VERSION: 0.0.1 | ||
DOCKER_IMAGE_ID: k6io/k6packager | ||
run: | | ||
echo "${{ secrets.CR_PAT }}" | docker login https://ghcr.io -u ${{ github.actor }} --password-stdin | ||
docker tag "$DOCKER_IMAGE_ID" "ghcr.io/${DOCKER_IMAGE_ID}:${VERSION}" | ||
docker push "ghcr.io/${DOCKER_IMAGE_ID}:${VERSION}" | ||
docker tag "$DOCKER_IMAGE_ID" "ghcr.io/${DOCKER_IMAGE_ID}:latest" | ||
docker push "ghcr.io/${DOCKER_IMAGE_ID}:latest" |
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