Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed CI publish-artifacts action and release based on tags #13

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ jobs:
run: make vendor vendor.check

- name: Build Artifacts
run: make -j2 build.all
run: make -j2 -i build.all
env:
# We're using docker buildx, which doesn't actually load the images it
# builds by default. Specifying --load does so.
Expand Down
86 changes: 0 additions & 86 deletions .github/workflows/release.yaml

This file was deleted.

81 changes: 77 additions & 4 deletions .github/workflows/tag.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Tag
name: Tag release

on:
workflow_dispatch:
Expand All @@ -11,9 +11,10 @@ on:
required: true

jobs:
create-tag:
create-tag-build-and-pack:
runs-on: ubuntu-22.04

permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v2
Expand All @@ -23,4 +24,76 @@ jobs:
with:
version: ${{ github.event.inputs.version }}
message: ${{ github.event.inputs.message }}
token: ${{ secrets.GITHUB_TOKEN }}
token: ${{ secrets.GITHUB_TOKEN }}

- name: CR authentication
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.ACCESS_TOKEN }}

- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 2
- name: Configure Git
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "[email protected]"

- name: Set VERSION env
run: echo "VERSION=${{ github.ref_name }}" >> $GITHUB_ENV

- name: Setup QEMU
uses: docker/setup-qemu-action@v1
with:
platforms: all

- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v1
with:
version: ${{ env.DOCKER_BUILDX_VERSION }}
install: true

- name: Setup Go
uses: actions/setup-go@v2
with:
go-version: ${{ env.GO_VERSION }}

- 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@v2
with:
path: ${{ steps.go.outputs.cache }}
key: ${{ runner.os }}-build-publish-artifacts-${{ hashFiles('**/go.sum') }}
restore-keys: ${{ runner.os }}-build-publish-artifacts-

- name: Cache Go Dependencies
uses: actions/cache@v2
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: Get make submodules
run: make submodules

- name: Process swagger.json
run: make process.scheme

- name: Install crossplane CLI
id: crossplane
run: curl -sL "https://raw.githubusercontent.com/crossplane/crossplane/master/install.sh" | sh

- name: Build provider image
run: docker build -t ${REGISTRY}/${{ github.repository }}/provider-magento:${{ env.VERSION }} ./cluster

- name: Build and push crossplane packages
run: ./crossplane xpkg build -f package -o provider-magento --embed-runtime-image ${REGISTRY}/${{ github.repository }}/provider-magento:${{ env.VERSION }} && ./crossplane xpkg push -f provider-magento ${REGISTRY}/${{ github.repository }}/provider-magento:${{ env.VERSION }};
Loading