Publish Manually #14
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: Publish Manually | |
on: | |
workflow_dispatch: | |
inputs: | |
provider: | |
type: choice | |
description: Choose the provider you want to publish | |
options: | |
- "amazon-ebs" | |
- "digitalocean" | |
- "googlecompute" | |
required: true | |
env: | |
PACKER_VERSION: "latest" | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
DIGITALOCEAN_ACCESS_TOKEN: ${{ secrets.DIGITALOCEAN_ACCESS_TOKEN }} | |
jobs: | |
publishing: | |
name: publish | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: 'google-github-actions/auth@v2' | |
with: | |
credentials_json: '${{ secrets.GOOGLE_CREDENTIALS }}' | |
- name: Setup `packer` | |
uses: hashicorp/setup-packer@main | |
with: | |
version: ${{ env.PACKER_VERSION }} | |
- name: Run `packer init` | |
run: "packer init ." | |
- name: Run `packer build` | |
run: "packer build -only ${{ github.event.inputs.provider }}.debian ." |