Fix: update hostname faster (#286) #55
Workflow file for this run
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: CD | |
on: | |
push: | |
tags: | |
- v* | |
env: | |
GOLANGCI_VERSION: 'v1.54.0' | |
DOCKER_BUILDX_VERSION: 'v0.4.2' | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Setup QEMU | |
uses: docker/setup-qemu-action@v3 | |
with: | |
platforms: all | |
- name: Setup Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
with: | |
version: ${{ env.DOCKER_BUILDX_VERSION }} | |
install: true | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Fetch History | |
run: git fetch --prune --unshallow | |
- name: Set up Go | |
uses: actions/setup-go@v3 | |
with: | |
go-version-file: 'go.mod' | |
- name: Find the Go Build Cache | |
id: go | |
run: echo "::set-output name=cache::$(make go.cachedir)" | |
- name: Cache the Go Build Cache | |
uses: actions/cache@v4 | |
with: | |
path: ${{ steps.go.outputs.cache }} | |
key: ${{ runner.os }}-build-e2e-tests-${{ hashFiles('**/go.sum') }} | |
restore-keys: ${{ runner.os }}-build-e2e-tests- | |
- name: Cache Go Dependencies | |
uses: actions/cache@v4 | |
with: | |
path: .work/pkg | |
key: ${{ runner.os }}-pkg-${{ hashFiles('**/go.sum') }} | |
restore-keys: | | |
${{ runner.os }}-pkg- | |
- name: Vendor Dependencies | |
run: make vendor vendor.check | |
- name: Build Helm Chart | |
run: make -j2 build VERSION=latest | |
env: | |
BUILD_ARGS: "--load" | |
- name: Docker Images List | |
run: make docker.list | grep "crossplane-provider-ionoscloud" | |
- name: Run E2E Tests | |
run: make e2e VERSION=latest USE_HELM3=true | |
env: | |
IONOS_USERNAME: ${{ secrets.IONOS_USERNAME }} | |
IONOS_PASSWORD: ${{ secrets.IONOS_PASSWORD }} | |
release-latest: | |
runs-on: ubuntu-latest | |
needs: test | |
steps: | |
- name: Setup QEMU | |
uses: docker/setup-qemu-action@v3 | |
with: | |
platforms: all | |
- name: Setup Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
with: | |
version: ${{ env.DOCKER_BUILDX_VERSION }} | |
install: true | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Fetch History | |
run: git fetch --prune --unshallow | |
- name: Set up Go | |
uses: actions/setup-go@v3 | |
with: | |
go-version-file: 'go.mod' | |
- name: Find the Go Build Cache | |
id: go | |
run: echo "::set-output name=cache::$(make go.cachedir)" | |
- name: Cache the Go Build Cache | |
uses: actions/cache@v4 | |
with: | |
path: ${{ steps.go.outputs.cache }} | |
key: ${{ runner.os }}-build-e2e-tests-${{ hashFiles('**/go.sum') }} | |
restore-keys: ${{ runner.os }}-build-e2e-tests- | |
- name: Cache Go Dependencies | |
uses: actions/cache@v4 | |
with: | |
path: .work/pkg | |
key: ${{ runner.os }}-pkg-${{ hashFiles('**/go.sum') }} | |
restore-keys: | | |
${{ runner.os }}-pkg- | |
- name: Vendor Dependencies | |
run: make vendor vendor.check | |
- name: Build Helm Chart | |
run: make -j2 build VERSION=latest | |
env: | |
BUILD_ARGS: "--load" | |
- name: Login to GitHub Container Registry | |
uses: docker/login-action@v1 | |
with: | |
registry: ghcr.io | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Docker Images List | |
run: make docker.list | |
- name: Push Docker Images | |
run: make docker.push VERSION=latest | |
release-tag: | |
runs-on: ubuntu-latest | |
# needs: test | |
steps: | |
- name: Setup QEMU | |
uses: docker/setup-qemu-action@v3 | |
with: | |
platforms: all | |
- name: Setup Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
with: | |
version: ${{ env.DOCKER_BUILDX_VERSION }} | |
install: true | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Fetch History | |
run: git fetch --prune --unshallow | |
- name: Set up Go | |
uses: actions/setup-go@v3 | |
with: | |
go-version-file: 'go.mod' | |
- name: Find the Go Build Cache | |
id: go | |
run: echo "::set-output name=cache::$(make go.cachedir)" | |
- name: Cache the Go Build Cache | |
uses: actions/cache@v4 | |
with: | |
path: ${{ steps.go.outputs.cache }} | |
key: ${{ runner.os }}-build-e2e-tests-${{ hashFiles('**/go.sum') }} | |
restore-keys: ${{ runner.os }}-build-e2e-tests- | |
- name: Cache Go Dependencies | |
uses: actions/cache@v4 | |
with: | |
path: .work/pkg | |
key: ${{ runner.os }}-pkg-${{ hashFiles('**/go.sum') }} | |
restore-keys: | | |
${{ runner.os }}-pkg- | |
- name: Vendor Dependencies | |
run: make vendor vendor.check | |
- name: Build Helm Chart | |
run: make -j2 build VERSION=${GITHUB_REF_NAME} | |
env: | |
BUILD_ARGS: "--load" | |
- name: Login to GitHub Container Registry | |
uses: docker/login-action@v1 | |
with: | |
registry: ghcr.io | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Docker Images Tag | |
run: make docker.tag VERSION=${GITHUB_REF_NAME} | |
- name: Docker Images List | |
run: make docker.list | grep "crossplane-provider-ionoscloud" | |
- name: Push Docker Images | |
run: make docker.push VERSION=${GITHUB_REF_NAME} |