mirror of
https://github.com/hashicorp/packer.git
synced 2026-10-25 15:38:22 -04:00
Bumps the actions group with 7 updates in the / directory: | Package | From | To | | --- | --- | --- | | [aws-actions/configure-aws-credentials](https://github.com/aws-actions/configure-aws-credentials) | `6.2.3` | `6.3.0` | | [hashicorp/actions-generate-metadata](https://github.com/hashicorp/actions-generate-metadata) | `1.1.4` | `1.3.1` | | [actions/upload-artifact](https://github.com/actions/upload-artifact) | `7.0.1` | `7.0.2` | | [hashicorp/actions-go-build](https://github.com/hashicorp/actions-go-build) | `1.1.2` | `1.1.3` | | [hashicorp/actions-docker-build](https://github.com/hashicorp/actions-docker-build) | `2.2.1` | `2.3.0` | | [github/issue-labeler](https://github.com/github/issue-labeler) | `3.4` | `3.5` | | [actions/download-artifact](https://github.com/actions/download-artifact) | `8.0.1` | `8.0.2` | Updates `aws-actions/configure-aws-credentials` from 6.2.3 to 6.3.0 - [Release notes](https://github.com/aws-actions/configure-aws-credentials/releases) - [Changelog](https://github.com/aws-actions/configure-aws-credentials/blob/main/CHANGELOG.md) - [Commits](https://github.com/aws-actions/configure-aws-credentials/compare/e6de054238d6b7531b4efff3b6587d9aade6a06c...e1253824e5c10ff9df46874f81ed3ec929e19cfd) Updates `hashicorp/actions-generate-metadata` from 1.1.4 to 1.3.1 - [Release notes](https://github.com/hashicorp/actions-generate-metadata/releases) - [Commits](https://github.com/hashicorp/actions-generate-metadata/compare/a43468dfb100445f2c2aa52cdc3d57b2c982a0f3...aff2981e4d616c852cf7652a8019e719e7a1cce0) Updates `actions/upload-artifact` from 7.0.1 to 7.0.2 - [Release notes](https://github.com/actions/upload-artifact/releases) - [Commits](https://github.com/actions/upload-artifact/compare/043fb46d1a93c77aae656e7c1c64a875d1fc6a0a...cf430e030ddbb5b0abf93d22962f4752f3646cd9) Updates `hashicorp/actions-go-build` from 1.1.2 to 1.1.3 - [Release notes](https://github.com/hashicorp/actions-go-build/releases) - [Changelog](https://github.com/hashicorp/actions-go-build/blob/main/CHANGELOG.md) - [Commits](https://github.com/hashicorp/actions-go-build/compare/dd7ca5a30c402c933e1fe61e0ff7165e5c4ee9e4...3f078f63a57c91c3e07285183d22e47869fe0dce) Updates `hashicorp/actions-docker-build` from 2.2.1 to 2.3.0 - [Release notes](https://github.com/hashicorp/actions-docker-build/releases) - [Changelog](https://github.com/hashicorp/actions-docker-build/blob/main/CHANGELOG.md) - [Commits](https://github.com/hashicorp/actions-docker-build/compare/e12557abf02a40557313ab2839d6cd2c6705261e...595f29357108da6d4767b6a48e5f01f25de0c131) Updates `github/issue-labeler` from 3.4 to 3.5 - [Release notes](https://github.com/github/issue-labeler/releases) - [Commits](https://github.com/github/issue-labeler/compare/c1b0f9f52a63158c4adc09425e858e87b32e9685...ccca1e16fcb66762200e616fc29b57b940c1cb67) Updates `actions/download-artifact` from 8.0.1 to 8.0.2 - [Release notes](https://github.com/actions/download-artifact/releases) - [Commits](https://github.com/actions/download-artifact/compare/3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c...9000827ccba6bdab643e8b6fd33ac0654aef8333) --- updated-dependencies: - dependency-name: aws-actions/configure-aws-credentials dependency-version: 6.3.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: actions - dependency-name: hashicorp/actions-generate-metadata dependency-version: 1.3.1 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: actions - dependency-name: actions/upload-artifact dependency-version: 7.0.2 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: actions - dependency-name: hashicorp/actions-go-build dependency-version: 1.1.3 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: actions - dependency-name: hashicorp/actions-docker-build dependency-version: 2.3.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: actions - dependency-name: github/issue-labeler dependency-version: '3.5' dependency-type: direct:production update-type: version-update:semver-minor dependency-group: actions - dependency-name: actions/download-artifact dependency-version: 8.0.2 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: actions ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
142 lines
5.3 KiB
YAML
142 lines
5.3 KiB
YAML
#
|
|
# This GitHub action triggers a fresh set of Packer builds
|
|
# and publishes them to GitHub Releases under the `nightly` tag.
|
|
# Note that artifacts available via GitHub Releases are not codesigned or notarized.
|
|
# Failures are reported to slack.
|
|
#
|
|
|
|
name: Nightly Release
|
|
|
|
on:
|
|
schedule:
|
|
# Runs against the default branch every day at midnight
|
|
- cron: "0 0 * * *"
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: write
|
|
|
|
jobs:
|
|
# Build a fresh set of artifacts
|
|
build-artifacts:
|
|
uses: ./.github/workflows/build.yml
|
|
github-release:
|
|
needs: build-artifacts
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
|
- name: Download built artifacts
|
|
uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
|
|
with:
|
|
path: out/
|
|
# Set BUILD_OUTPUT_LIST to out\<project>-<version>.<fileext>\*,out\...
|
|
# This is needed to attach the build artifacts to the GitHub Release
|
|
- name: Set BUILD_OUTPUT_LIST
|
|
run: |
|
|
echo "$(ls -xm1 out/)" > tmp.txt
|
|
cat tmp.txt | sed 's:.*:out/&/*:' > tmp2.txt
|
|
echo "BUILD_OUTPUT_LIST=$(cat tmp2.txt | tr '\n' ',' | perl -ple 'chop')" >> $GITHUB_ENV
|
|
rm -rf tmp.txt && rm -rf tmp2.txt
|
|
- name: Advance nightly tag
|
|
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
|
|
with:
|
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
script: |
|
|
try {
|
|
await github.rest.git.deleteRef({
|
|
owner: context.repo.owner,
|
|
repo: context.repo.repo,
|
|
ref: "tags/nightly"
|
|
})
|
|
} catch (e) {
|
|
console.log("Warning: The nightly tag doesn't exist yet, so there's nothing to do. Trace: " + e)
|
|
}
|
|
await github.rest.git.createRef({
|
|
owner: context.repo.owner,
|
|
repo: context.repo.repo,
|
|
ref: "refs/tags/nightly",
|
|
sha: context.sha
|
|
})
|
|
# This will create a new GitHub Release called `nightly`
|
|
# If a release with this name already exists, it will overwrite the existing data
|
|
- name: Create a nightly GitHub prerelease
|
|
id: create_prerelease
|
|
continue-on-error: true
|
|
uses: ncipollo/release-action@339a81892b84b4eeb0f6e744e4574d79d0d9b8dd # v1.21.0
|
|
with:
|
|
name: nightly
|
|
artifacts: "${{ env.BUILD_OUTPUT_LIST }}"
|
|
tag: nightly
|
|
bodyFile: ".github/workflows/nightly-release-readme.md"
|
|
prerelease: true
|
|
allowUpdates: true
|
|
removeArtifacts: true
|
|
draft: false
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
- name: Store GitHub Release ID
|
|
if: steps.create_prerelease.outcome == 'success'
|
|
run: |
|
|
echo "prerelease_id=${{ steps.create_prerelease.outputs.id }}" >> $GITHUB_ENV
|
|
- name: Sleep before retry
|
|
id: sleep_before_retry
|
|
if: steps.create_prerelease.outcome == 'failure'
|
|
run : sleep 30m
|
|
shell: bash
|
|
- name: Retry failed nightly GitHub prerelease
|
|
id: create_prerelease_retry
|
|
if: steps.create_prerelease.outcome == 'failure'
|
|
uses: ncipollo/release-action@339a81892b84b4eeb0f6e744e4574d79d0d9b8dd # v1.21.0
|
|
with:
|
|
name: nightly
|
|
artifacts: "${{ env.BUILD_OUTPUT_LIST }}"
|
|
tag: nightly
|
|
bodyFile: ".github/workflows/nightly-release-readme.md"
|
|
prerelease: true
|
|
allowUpdates: true
|
|
removeArtifacts: true
|
|
draft: false
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
- name: Store Updated GitHub Release ID
|
|
if: steps.create_prerelease_retry.outcome == 'success'
|
|
run: |
|
|
echo "prerelease_id=${{ steps.create_prerelease_retry.outputs.id }}" >> $GITHUB_ENV
|
|
- name: Publish nightly GitHub prerelease
|
|
uses: eregon/publish-release@01df127f5e9a3c26935118e22e738d95b59d10ce # v1.0.6
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
with:
|
|
release_id: ${{ env.prerelease_id }}
|
|
# Send a slack notification if either job defined above fails
|
|
slack-notify:
|
|
permissions:
|
|
contents: none
|
|
needs:
|
|
- build-artifacts
|
|
- github-release
|
|
if: always() && (needs.build-artifacts.result == 'failure' || needs.github-release.result == 'failure')
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Send slack notification on failure
|
|
uses: slackapi/slack-github-action@0d95c9a7becc1e6e297d76df9bc735c44f4cbcbc # v3.0.5
|
|
with:
|
|
webhook: ${{ secrets.SLACK_WEBHOOK_URL }}
|
|
webhook-type: incoming-webhook
|
|
payload: |
|
|
{
|
|
"text": ":alert: Packer Nightly Release *FAILED* :alert:",
|
|
"attachments": [
|
|
{
|
|
"color": "#C41E3A",
|
|
"blocks": [
|
|
{
|
|
"type": "section",
|
|
"text": {
|
|
"type": "mrkdwn",
|
|
"text": "Branch: `${{ github.ref_name }}`\nRef: ${{ github.sha }}\nWorkflow: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|