Skip to content

Commit e0f7960

Browse files
authored
Change to METALCTL_API_URL, align Github Actions workflows and updates. (#14)
1 parent 5cd06a3 commit e0f7960

File tree

8 files changed

+74
-108
lines changed

8 files changed

+74
-108
lines changed

.github/workflows/docker.yaml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
---
2+
name: Docker Build Action
3+
on:
4+
pull_request:
5+
branches:
6+
- master
7+
release:
8+
types:
9+
- published
10+
push:
11+
branches:
12+
- master
13+
14+
env:
15+
REGISTRY: ghcr.io
16+
IMAGE_NAME: ${{ github.repository }}
17+
18+
jobs:
19+
build:
20+
name: Docker Build
21+
runs-on: ubuntu-latest
22+
23+
steps:
24+
- name: Log in to the container registry
25+
uses: docker/login-action@v1
26+
with:
27+
registry: ${{ env.REGISTRY }}
28+
username: ${{ secrets.DOCKER_REGISTRY_USER }}
29+
password: ${{ secrets.DOCKER_REGISTRY_TOKEN }}
30+
31+
- name: Checkout
32+
uses: actions/checkout@v2
33+
34+
- name: Set up Go 1.19
35+
uses: actions/setup-go@v2
36+
with:
37+
go-version: '1.19'
38+
39+
- name: Lint
40+
uses: golangci/golangci-lint-action@v2
41+
with:
42+
args: --build-tags integration -p bugs -p unused --timeout=3m
43+
44+
- name: Make tag
45+
run: |
46+
[ "${GITHUB_EVENT_NAME}" == 'pull_request' ] && echo "tag=${GITHUB_HEAD_REF##*/}" >> $GITHUB_ENV || true
47+
[ "${GITHUB_EVENT_NAME}" == 'release' ] && echo "tag=${GITHUB_REF##*/}" >> $GITHUB_ENV || true
48+
[ "${GITHUB_EVENT_NAME}" == 'push' ] && echo "tag=latest" >> $GITHUB_ENV || true
49+
50+
- name: Build and push image
51+
uses: docker/build-push-action@v2
52+
with:
53+
context: .
54+
push: true
55+
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.tag }}

.github/workflows/latest.yaml

Lines changed: 0 additions & 34 deletions
This file was deleted.

.github/workflows/pull_request.yaml

Lines changed: 0 additions & 40 deletions
This file was deleted.
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
name: Release Drafter Action
3+
4+
on:
5+
push:
6+
branches:
7+
- master
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: release-drafter/release-drafter@v5
14+
env:
15+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/release.yaml

Lines changed: 0 additions & 30 deletions
This file was deleted.

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ MAINMODULE := github.com/metal-stack/metal-image-cache-sync/cmd
33
COMMONDIR := $(or ${COMMONDIR},../builder)
44

55
# default points to mini-lab
6-
METAL_API_ENDPOINT := $(or ${METALCTL_URL},http://api.0.0.0.0.nip.io:8080/metal)
6+
METAL_API_ENDPOINT := $(or ${METALCTL_API_URL},http://api.0.0.0.0.nip.io:8080/metal)
77
METAL_API_HMAC := $(or ${METALCTL_HMAC},metal-view)
88

99
include $(COMMONDIR)/Makefile.inc

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ go 1.18
44

55
require (
66
github.com/Masterminds/semver/v3 v3.1.1
7-
github.com/aws/aws-sdk-go v1.44.77
7+
github.com/aws/aws-sdk-go v1.44.79
88
github.com/docker/go-units v0.4.0
99
github.com/go-openapi/strfmt v0.21.3
1010
github.com/go-playground/validator/v10 v10.11.0

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk5
5050
github.com/asaskevich/govalidator v0.0.0-20200907205600-7a23bdc65eef/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw=
5151
github.com/asaskevich/govalidator v0.0.0-20210307081110-f21760c49a8d h1:Byv0BzEl3/e6D5CLfI0j/7hiIEtvGVFPCZ7Ei2oq8iQ=
5252
github.com/asaskevich/govalidator v0.0.0-20210307081110-f21760c49a8d/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw=
53-
github.com/aws/aws-sdk-go v1.44.77 h1:m5rTfdv04/swD+vTuS2zn4NEwKX3yEJPMhiVCFDL/mU=
54-
github.com/aws/aws-sdk-go v1.44.77/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo=
53+
github.com/aws/aws-sdk-go v1.44.79 h1:IZCtfBq9VlJ1Eu34I+2Y76q+XkvTtZYbEwaoVM1gzoA=
54+
github.com/aws/aws-sdk-go v1.44.79/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo=
5555
github.com/benbjohnson/clock v1.3.0 h1:ip6w0uFQkncKQ979AypyG0ER7mqUSBdKLOgAle/AT8A=
5656
github.com/benbjohnson/clock v1.3.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA=
5757
github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q=

0 commit comments

Comments
 (0)