mirror of
https://github.com/netbirdio/netbird-crossplane-provider.git
synced 2026-05-22 18:44:14 -07:00
chore: test github actions
This commit is contained in:
@@ -10,8 +10,8 @@ on:
|
||||
env:
|
||||
# Common versions
|
||||
GO_VERSION: '1.23'
|
||||
DOCKER_BUILDX_VERSION: 'v0.20.1'
|
||||
CLEANUP_DISK: "true"
|
||||
GOLANGCI_VERSION: 'v1.54.0'
|
||||
DOCKER_BUILDX_VERSION: 'v0.9.1'
|
||||
|
||||
# Registry/Org names
|
||||
CROSSPLANE_REGORG: 'ghcr.io/infitx-org'
|
||||
@@ -20,37 +20,19 @@ jobs:
|
||||
publish-provider:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Cleanup Disk
|
||||
uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be # v1.3.1
|
||||
if: ${{ env.CLEANUP_DISK }} == "true"
|
||||
with:
|
||||
android: true
|
||||
dotnet: true
|
||||
haskell: true
|
||||
tool-cache: true
|
||||
large-packages: false
|
||||
swap-storage: false
|
||||
|
||||
- name: Setup QEMU
|
||||
uses: docker/setup-qemu-action@2b82ce82d56a2a04d2637cd93a637ae1b359c0a7 # v2
|
||||
uses: docker/setup-qemu-action@v2
|
||||
with:
|
||||
platforms: all
|
||||
|
||||
- name: Setup Docker Buildx
|
||||
uses: docker/setup-buildx-action@885d1462b80bc1c1c7f0b00334ad271f09369c55 # v2
|
||||
uses: docker/setup-buildx-action@v2
|
||||
with:
|
||||
version: ${{ env.DOCKER_BUILDX_VERSION }}
|
||||
install: true
|
||||
|
||||
- name: Login to GHCR using PAT
|
||||
uses: docker/login-action@v3.3.0
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: true
|
||||
|
||||
@@ -70,8 +52,8 @@ jobs:
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: ${{ env.cachedir }}
|
||||
key: ${{ runner.os }}-build-publish-provider-${{ hashFiles('**/go.sum') }}
|
||||
restore-keys: ${{ runner.os }}-build-publish-provider-
|
||||
key: ${{ runner.os }}-build-publish-artifacts-${{ hashFiles('**/go.sum') }}
|
||||
restore-keys: ${{ runner.os }}-build-publish-artifacts-
|
||||
|
||||
- name: Cache Go Dependencies
|
||||
uses: actions/cache@v3
|
||||
@@ -83,13 +65,6 @@ jobs:
|
||||
- name: Download Go Modules
|
||||
run: make modules.download modules.check
|
||||
|
||||
- name: Build Artifacts
|
||||
run: make -j2 build.all
|
||||
env:
|
||||
# We're using docker buildx, which doesn't actually load the images it
|
||||
# builds by default. Specifying --load does so.
|
||||
BUILD_ARGS: "--load"
|
||||
|
||||
- name: Publish Provider
|
||||
run: |
|
||||
make -j XPKG_REG_ORGS="${{ env.CROSSPLANE_REGORG }}" XPKG_REG_ORGS_NO_PROMOTE="${{ env.CROSSPLANE_REGORG }}" publish
|
||||
|
||||
Reference in New Issue
Block a user