Skip to content

feat(terraform): update terraform cloudflare to 4.34.0 (#2509) #12

feat(terraform): update terraform cloudflare to 4.34.0 (#2509)

feat(terraform): update terraform cloudflare to 4.34.0 (#2509) #12

Workflow file for this run

---
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
name: "Publish Terraform"
on:
workflow_dispatch:
push:
branches: ["main"]
paths: ["terraform/**"]
jobs:
publish-terraform:
name: Publish Terraform
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Generate Token
uses: actions/create-github-app-token@a0de6af83968303c8c955486bf9739a57d23c7f1 # v1
id: app-token
with:
app-id: "${{ secrets.BOT_APP_ID }}"
private-key: "${{ secrets.BOT_APP_PRIVATE_KEY }}"
- name: Checkout
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4
with:
token: "${{ steps.app-token.outputs.token }}"
- name: Setup Homebrew
uses: Homebrew/actions/setup-homebrew@master
- name: Setup Workflow Tools
shell: bash
run: brew install fluxcd/tap/flux
- name: Login to GitHub Container Registry
uses: docker/login-action@0d4c9c5ea7693da7b068278f7b52bda2a190a446 # v3
with:
registry: ghcr.io
username: "${{ github.actor }}"
password: "${{ secrets.GITHUB_TOKEN }}"
- name: Generate Tag
id: generate-tag
shell: bash
run: echo "tag=ghcr.io/${{ github.repository_owner }}/manifests/terraform:$(git rev-parse --short HEAD)" >> "${GITHUB_OUTPUT}"
- name: Publish OCI Artifact
shell: bash
run: |
flux push artifact oci://${{ steps.generate-tag.outputs.tag }} \
--path="./terraform" \
--source="$(git config --get remote.origin.url)" \
--revision="$(git branch --show-current)/$(git rev-parse HEAD)"
- name: Tag OCI Artifact
shell: bash
run: |
flux tag artifact \
oci://${{ steps.generate-tag.outputs.tag }} \
--tag main