diff --git a/.github/workflows/manual_publish.yml b/.github/workflows/manual_publish.yml new file mode 100644 index 0000000..bb0537e --- /dev/null +++ b/.github/workflows/manual_publish.yml @@ -0,0 +1,36 @@ +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 }} + +jobs: + publishing: + name: publish + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - 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 ." diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 6a6b9dd..6189f39 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -5,9 +5,6 @@ on: tags: - v* -on: - pull_request: - env: PACKER_VERSION: "latest" DIGITALOCEAN_ACCESS_TOKEN: ${{ secrets.DIGITALOCEAN_ACCESS_TOKEN }}