Only run tests on main repository #149
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
on: | |
push: | |
branches: | |
- 'main' | |
- 'build-*' | |
tags: | |
- 'desktop-v*' | |
- 'utility-v*' | |
jobs: | |
sync-vagrant-vmware-desktop: | |
if: github.repository == 'hashicorp/vagrant-vmware-desktop-builder' | |
runs-on: ['self-hosted', 'ondemand', 'linux', 'type=t3.small'] | |
permissions: | |
id-token: write | |
contents: write | |
steps: | |
- name: Authentication | |
id: vault-auth | |
run: vault-auth | |
- name: Secrets | |
id: secrets | |
uses: hashicorp/vault-action@v2 | |
with: | |
url: ${{ steps.vault-auth.outputs.addr }} | |
caCertificate: ${{ steps.vault-auth.outputs.ca_certificate }} | |
token: ${{ steps.vault-auth.outputs.token }} | |
secrets: | |
kv/data/github/hashicorp/vagrant-vmware-desktop-builder vagrant_vmware_desktop_repo_token; | |
- name: Code Checkout | |
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | |
with: | |
persist-credentials: false | |
fetch-depth: 0 | |
- name: Sync vagrant-vmware-desktop Repository | |
run: ./.ci/sync.sh | |
env: | |
HASHIBOT_TOKEN: ${{ steps.secrets.outputs.vagrant_vmware_desktop_repo_token }} | |
HASHIBOT_USERNAME: ${{ vars.HASHIBOT_USERNAME }} | |
sync-vagrant-vmware-desktop-builder: | |
if: github.repository == 'hashicorp/vagrant-vmware-desktop' | |
runs-on: ubuntu-latest | |
steps: | |
- name: Code Checkout | |
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | |
with: | |
persist-credentials: false | |
fetch-depth: 0 | |
- name: Sync vagrant-vmware-desktop-builder Repository | |
run: ./.ci/sync.sh | |
env: | |
HASHIBOT_TOKEN: ${{ secrets.HASHIBOT_TOKEN }} | |
HASHIBOT_USERNAME: ${{ vars.HASHIBOT_USERNAME }} |