Create Development Tag #31
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: Create Development Tag | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: '5 3 * * *' | |
env: | |
GOWORK: off | |
GOPRIVATE: github.com/mesosphere | |
permissions: | |
contents: write | |
actions: write | |
jobs: | |
generate-matrix: | |
outputs: | |
matrix: ${{ steps.set-matrix.outputs.matrix }} | |
runs-on: | |
- self-hosted | |
- small | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: 'stable' | |
- name: Install GH CLI | |
uses: dev-hanz-ops/install-gh-cli-action@v0.1.0 | |
- name: Generate tag | |
id: set-matrix | |
run: | | |
OUT=$(make repo.supported-branches | tail -n 1) | |
echo "matrix=$OUT" >> $GITHUB_OUTPUT | |
env: | |
GITHUB_TOKEN: ${{ secrets.MESOSPHERECI_USER_TOKEN }} | |
create-dev-tag: | |
needs: generate-matrix | |
runs-on: | |
- self-hosted | |
- small | |
strategy: | |
fail-fast: false | |
matrix: | |
branch: ${{ fromJson(needs.generate-matrix.outputs.matrix) }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ matrix.branch }} | |
depth: 0 | |
- name: Setup Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: 'stable' | |
- name: Install GH CLI | |
uses: dev-hanz-ops/install-gh-cli-action@v0.1.0 | |
- name: Import GPG key | |
uses: crazy-max/ghaction-import-gpg@v6 | |
with: | |
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }} | |
passphrase: ${{ secrets.GPG_PASSPHRASE }} | |
git_user_signingkey: true | |
git_commit_gpgsign: true | |
git_push_gpgsign: false | |
- name: Generate tag | |
run: | | |
# Overriding a variable that causes a conflict in legacy | |
# versions of gh-dkp | |
export GITHUB_REPOSITORY="dkp-catalog-applications" | |
OUT=$(make repo.dev.tag) | |
TEMP_OUT="${OUT//$'\n'/@@}" | |
echo "TAG=$(echo ${TEMP_OUT##*@@})" >> $GITHUB_ENV | |
env: | |
GITHUB_TOKEN: ${{ secrets.MESOSPHERECI_USER_TOKEN }} | |
- name: Create tag | |
run: | | |
git config --global user.email "ci-mergebot@d2iq.com" | |
git config --global user.name "ci-mergebot" | |
git tag -s -f -m "${{ env.TAG }}" ${{ env.TAG }} | |
- name: Push tag | |
run: git push --force --tags origin ${{ env.TAG }} |