mirror of
https://github.com/hashicorp/packer.git
synced 2026-09-18 22:11:39 -04:00
Pin Action Refs to Latest
This commit is contained in:
@@ -21,7 +21,7 @@ jobs:
|
||||
outputs:
|
||||
go-version: ${{ steps.get-go-version.outputs.go-version }}
|
||||
steps:
|
||||
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
|
||||
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
||||
- name: 'Determine Go version'
|
||||
id: get-go-version
|
||||
# We use .go-version as our source of truth for current Go
|
||||
@@ -42,12 +42,12 @@ jobs:
|
||||
# Packer GH Token for API Rate Limiting
|
||||
PACKER_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
steps:
|
||||
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
|
||||
- uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
|
||||
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
||||
- uses: actions/setup-go@924ae3a1cded613372ab5595356fb5720e22ba16 # v6.5.0
|
||||
with:
|
||||
go-version: ${{ needs.get-go-version.outputs.go-version }}
|
||||
- name: IAM Assume Role
|
||||
uses: aws-actions/configure-aws-credentials@7474bc4690e29a8392af63c5b98e7449536d5c3a # v4.3.1
|
||||
uses: aws-actions/configure-aws-credentials@517a711dbcd0e402f90c77e7e2f81e849156e31d # v6.2.2
|
||||
with:
|
||||
role-to-assume: ${{ env.AWS_ROLE_ARN }}
|
||||
aws-region: ${{ env.AWS_REGION }}
|
||||
@@ -75,8 +75,10 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Send slack notification on failure
|
||||
uses: slackapi/slack-github-action@fcfb566f8b0aab22203f066d80ca1d7e4b5d05b3 # v1.27.1
|
||||
uses: slackapi/slack-github-action@45a88b9581bfab2566dc881e2cd66d334e621e2c # v3.0.3
|
||||
with:
|
||||
webhook: ${{ secrets.SLACK_WEBHOOK_URL }}
|
||||
webhook-type: incoming-webhook
|
||||
payload: |
|
||||
{
|
||||
"text": ":alert: Packer Nightly Acceptance Tests *FAILED* :alert:",
|
||||
@@ -95,6 +97,3 @@ jobs:
|
||||
}
|
||||
]
|
||||
}
|
||||
env:
|
||||
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
|
||||
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK
|
||||
|
||||
+24
-23
@@ -27,7 +27,7 @@ jobs:
|
||||
outputs:
|
||||
go-version: ${{ steps.get-go-version.outputs.go-version }}
|
||||
steps:
|
||||
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
|
||||
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
||||
- name: 'Determine Go version'
|
||||
id: get-go-version
|
||||
# We use .go-version as our source of truth for current Go
|
||||
@@ -45,10 +45,10 @@ jobs:
|
||||
product-prerelease-version: ${{ steps.set-product-version.outputs.prerelease-product-version }}
|
||||
set-ld-flags: ${{ steps.set-ld-flags.outputs.set-ld-flags }}
|
||||
steps:
|
||||
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
|
||||
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
||||
- name: set product version
|
||||
id: set-product-version
|
||||
uses: hashicorp/actions-set-product-version@v1
|
||||
uses: hashicorp/actions-set-product-version@d9be602dfa87e201c79a3937c038f19391c9a430 # v2.0.2
|
||||
- name: set-ld-flags
|
||||
id: set-ld-flags
|
||||
run: |
|
||||
@@ -68,15 +68,16 @@ jobs:
|
||||
filepath: ${{ steps.generate-metadata-file.outputs.filepath }}
|
||||
steps:
|
||||
- name: 'Checkout directory'
|
||||
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
|
||||
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
||||
- name: Generate metadata file
|
||||
id: generate-metadata-file
|
||||
uses: hashicorp/actions-generate-metadata@main
|
||||
uses: hashicorp/actions-generate-metadata@a43468dfb100445f2c2aa52cdc3d57b2c982a0f3 # v1.1.4
|
||||
with:
|
||||
version: ${{ needs.set-product-version.outputs.product-version }}
|
||||
product: ${{ env.REPO_NAME }}
|
||||
repository: ${{ env.REPO_NAME }}
|
||||
|
||||
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
|
||||
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
|
||||
with:
|
||||
name: metadata.json
|
||||
path: ${{ steps.generate-metadata-file.outputs.filepath }}
|
||||
@@ -106,14 +107,14 @@ jobs:
|
||||
GOPRIVATE: "github.com/hashicorp"
|
||||
GO111MODULE: on
|
||||
steps:
|
||||
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
|
||||
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
||||
- name: Go Build
|
||||
env:
|
||||
PRODUCT_VERSION: ${{ needs.set-product-version.outputs.product-version }}
|
||||
PRERELEASE_VERSION: ${{ needs.set-product-version.outputs.product-prerelease-version }}
|
||||
LD_FLAGS: "${{ needs.set-product-version.outputs.set-ld-flags}}"
|
||||
CGO_ENABLED: "0"
|
||||
uses: hashicorp/actions-go-build@v1
|
||||
uses: hashicorp/actions-go-build@dd7ca5a30c402c933e1fe61e0ff7165e5c4ee9e4 # v1.1.2
|
||||
with:
|
||||
product_name: ${{ env.REPO_NAME }}
|
||||
product_version: ${{ needs.set-product-version.outputs.product-version }}
|
||||
@@ -144,14 +145,14 @@ jobs:
|
||||
GO111MODULE: on
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
|
||||
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
||||
- name: Go Build
|
||||
env:
|
||||
PRODUCT_VERSION: ${{ needs.set-product-version.outputs.product-version }}
|
||||
PRERELEASE_VERSION: ${{ needs.set-product-version.outputs.product-prerelease-version }}
|
||||
LD_FLAGS: "${{ needs.set-product-version.outputs.set-ld-flags}}"
|
||||
CGO_ENABLED: "0"
|
||||
uses: hashicorp/actions-go-build@v1
|
||||
uses: hashicorp/actions-go-build@dd7ca5a30c402c933e1fe61e0ff7165e5c4ee9e4 # v1.1.2
|
||||
with:
|
||||
product_name: ${{ env.REPO_NAME }}
|
||||
product_version: ${{ needs.set-product-version.outputs.product-version }}
|
||||
@@ -170,7 +171,7 @@ jobs:
|
||||
run: |
|
||||
mkdir -p "$LICENSE_DIR" && cp LICENSE "$LICENSE_DIR/LICENSE.txt"
|
||||
- name: Linux Packaging
|
||||
uses: hashicorp/actions-packaging-linux@v1
|
||||
uses: hashicorp/actions-packaging-linux@006298649be64cee63e7f94a54dfcf3e14766bf6 # v1.11
|
||||
with:
|
||||
name: ${{ env.REPO_NAME }}
|
||||
description: "HashiCorp Packer - A tool for creating identical machine images for multiple platforms from a single source configuration"
|
||||
@@ -187,11 +188,11 @@ jobs:
|
||||
run: |
|
||||
echo "RPM_PACKAGE=$(basename out/*.rpm)" >> $GITHUB_ENV
|
||||
echo "DEB_PACKAGE=$(basename out/*.deb)" >> $GITHUB_ENV
|
||||
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
|
||||
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
|
||||
with:
|
||||
name: ${{ env.RPM_PACKAGE }}
|
||||
path: out/${{ env.RPM_PACKAGE }}
|
||||
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
|
||||
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
|
||||
with:
|
||||
name: ${{ env.DEB_PACKAGE }}
|
||||
path: out/${{ env.DEB_PACKAGE }}
|
||||
@@ -214,14 +215,14 @@ jobs:
|
||||
GO111MODULE: on
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
|
||||
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
||||
- name: Go Build
|
||||
env:
|
||||
PRODUCT_VERSION: ${{ needs.set-product-version.outputs.product-version }}
|
||||
PRERELEASE_VERSION: ${{ needs.set-product-version.outputs.product-prerelease-version }}
|
||||
LD_FLAGS: "${{ needs.set-product-version.outputs.set-ld-flags}}"
|
||||
CGO_ENABLED: "0"
|
||||
uses: hashicorp/actions-go-build@v1
|
||||
uses: hashicorp/actions-go-build@dd7ca5a30c402c933e1fe61e0ff7165e5c4ee9e4 # v1.1.2
|
||||
with:
|
||||
product_name: ${{ env.REPO_NAME }}
|
||||
product_version: ${{ needs.set-product-version.outputs.product-version }}
|
||||
@@ -245,18 +246,18 @@ jobs:
|
||||
env:
|
||||
version: ${{ needs.set-product-version.outputs.product-version }}
|
||||
steps:
|
||||
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
|
||||
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
||||
- name: Docker Build (Action)
|
||||
uses: hashicorp/actions-docker-build@v2
|
||||
uses: hashicorp/actions-docker-build@e12557abf02a40557313ab2839d6cd2c6705261e # v2.2.1
|
||||
with:
|
||||
version: ${{ env.version }}
|
||||
target: release-light
|
||||
arch: ${{ matrix.arch }}
|
||||
tags: |
|
||||
${{ steps.set-product-version.output.prerelease-product-version == '' && format('docker.io/hashicorp/{0}:light', env.REPO_NAME) }}
|
||||
${{ needs.set-product-version.outputs.product-prerelease-version == '' && format('docker.io/hashicorp/{0}:light', env.REPO_NAME) }}
|
||||
docker.io/hashicorp/${{ env.REPO_NAME }}:light-${{ env.version }}
|
||||
docker.io/hashicorp/${{ env.REPO_NAME }}:${{ env.version }}
|
||||
${{ steps.set-product-version.output.prerelease-product-version == '' && format('public.ecr.aws/hashicorp/{0}:light', env.REPO_NAME) }}
|
||||
${{ needs.set-product-version.outputs.product-prerelease-version == '' && format('public.ecr.aws/hashicorp/{0}:light', env.REPO_NAME) }}
|
||||
public.ecr.aws/hashicorp/${{ env.REPO_NAME }}:light-${{ env.version }}
|
||||
public.ecr.aws/hashicorp/${{ env.REPO_NAME }}:${{ env.version }}
|
||||
dev_tags: |
|
||||
@@ -275,17 +276,17 @@ jobs:
|
||||
env:
|
||||
version: ${{ needs.set-product-version.outputs.product-version }}
|
||||
steps:
|
||||
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
|
||||
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
||||
- name: Docker Build (Action)
|
||||
uses: hashicorp/actions-docker-build@v2
|
||||
uses: hashicorp/actions-docker-build@e12557abf02a40557313ab2839d6cd2c6705261e # v2.2.1
|
||||
with:
|
||||
version: ${{ env.version }}
|
||||
target: release-full
|
||||
arch: ${{ matrix.arch }}
|
||||
tags: |
|
||||
${{ steps.set-product-version.output.prerelease-product-version == '' && format('docker.io/hashicorp/{0}:full', env.REPO_NAME) }}
|
||||
${{ needs.set-product-version.outputs.product-prerelease-version == '' && format('docker.io/hashicorp/{0}:full', env.REPO_NAME) }}
|
||||
docker.io/hashicorp/${{ env.REPO_NAME }}:full-${{ env.version }}
|
||||
${{ steps.set-product-version.output.prerelease-product-version == '' && format('public.ecr.aws/hashicorp/{0}:full', env.REPO_NAME) }}
|
||||
${{ needs.set-product-version.outputs.product-prerelease-version == '' && format('public.ecr.aws/hashicorp/{0}:full', env.REPO_NAME) }}
|
||||
public.ecr.aws/hashicorp/${{ env.REPO_NAME }}:full-${{ env.version }}
|
||||
dev_tags: |
|
||||
docker.io/hashicorppreview/${{ env.REPO_NAME }}:full-${{ env.version }}
|
||||
|
||||
@@ -15,7 +15,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Login
|
||||
uses: atlassian/gajira-login@45fd029b9f1d6d8926c6f04175aa80c0e42c9026 # v3.0.1
|
||||
uses: atlassian/gajira-login@ca13f8850ea309cf44a6e4e0c49d9aa48ac3ca4c # v3
|
||||
env:
|
||||
JIRA_BASE_URL: ${{ secrets.JIRA_BASE_URL }}
|
||||
JIRA_USER_EMAIL: ${{ secrets.JIRA_USER_EMAIL }}
|
||||
@@ -61,7 +61,7 @@ jobs:
|
||||
- name: Create ticket
|
||||
id: create-ticket
|
||||
if: steps.search.outputs.issue == '' && github.event.label.name == 'sync to jira' && steps.set-ticket-type.outputs.type != 'Invalid'
|
||||
uses: atlassian/gajira-create@59e177c4f6451399df5b4911c2211104f171e669 # v3.0.1
|
||||
uses: atlassian/gajira-create@1ff0b6bd115a780592b47bfbb63fc4629132e6ec # v3
|
||||
with:
|
||||
project: HPR
|
||||
issuetype: "${{ steps.set-ticket-type.outputs.type }}"
|
||||
@@ -72,7 +72,7 @@ jobs:
|
||||
|
||||
- name: Add tracking comment
|
||||
if: steps.create-ticket.outputs.issue != '' && steps.set-ticket-type.outputs.type != 'Invalid'
|
||||
uses: actions/github-script@f28e40c7f34bde8b3046d885e986cb6290c5673b # v7.1.0
|
||||
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
|
||||
with:
|
||||
script: |
|
||||
github.rest.issues.createComment({
|
||||
|
||||
@@ -19,14 +19,14 @@ permissions:
|
||||
jobs:
|
||||
# Build a fresh set of artifacts
|
||||
build-artifacts:
|
||||
uses: hashicorp/packer/.github/workflows/build.yml@main
|
||||
uses: ./.github/workflows/build.yml
|
||||
github-release:
|
||||
needs: build-artifacts
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
|
||||
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
||||
- name: Download built artifacts
|
||||
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
|
||||
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
|
||||
with:
|
||||
path: out/
|
||||
# Set BUILD_OUTPUT_LIST to out\<project>-<version>.<fileext>\*,out\...
|
||||
@@ -38,7 +38,7 @@ jobs:
|
||||
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@f28e40c7f34bde8b3046d885e986cb6290c5673b # v7.1.0
|
||||
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
|
||||
with:
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
script: |
|
||||
@@ -117,8 +117,10 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Send slack notification on failure
|
||||
uses: slackapi/slack-github-action@fcfb566f8b0aab22203f066d80ca1d7e4b5d05b3 # v1.27.1
|
||||
uses: slackapi/slack-github-action@45a88b9581bfab2566dc881e2cd66d334e621e2c # v3.0.3
|
||||
with:
|
||||
webhook: ${{ secrets.SLACK_WEBHOOK_URL }}
|
||||
webhook-type: incoming-webhook
|
||||
payload: |
|
||||
{
|
||||
"text": ":alert: Packer Nightly Release *FAILED* :alert:",
|
||||
@@ -137,6 +139,3 @@ jobs:
|
||||
}
|
||||
]
|
||||
}
|
||||
env:
|
||||
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
|
||||
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK
|
||||
|
||||
Reference in New Issue
Block a user