k6packager #1
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
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 | |
env: | |
VERSION: 0.0.3 | |
AWSCLI_VERSION: 2.1.36 | |
S3CMD_VERSION: 2.1.0 | |
DOCKER_IMAGE_ID: ghcr.io/grafana/k6packager | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Build | |
run: | | |
cd packaging | |
docker-compose build packager | |
- name: Publish | |
run: | | |
echo "${{ secrets.GITHUB_TOKEN }}" | docker login https://ghcr.io -u ${{ github.actor }} --password-stdin | |
docker push "${DOCKER_IMAGE_ID}:latest" | |
docker tag "${DOCKER_IMAGE_ID}" "${DOCKER_IMAGE_ID}:${VERSION}" | |
docker push "${DOCKER_IMAGE_ID}:${VERSION}" |