Skip to content

Commit

Permalink
Install Certificate Authorities on Ubuntu 22.04 Docker base image (#218)
Browse files Browse the repository at this point in the history
* Install CA certificates

* separate RUN commands

* Build dry-run

* Remove apt-get update

* Add QEMU setup

* Publish when commit is tagged

* Execute release-dry-run on every commit exept tagged ones

* Move conditional to specific steps

* Add skip-publish to dry-run
  • Loading branch information
danielelisi authored Jul 7, 2022
1 parent 87c287f commit aaa2087
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 10 deletions.
29 changes: 20 additions & 9 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,19 +48,24 @@ jobs:
fi
publish:
name: Publish
if: startsWith(github.ref, 'refs/tags/v')
name: Goreleaser
runs-on: ubuntu-latest
needs: test
steps:
- name: Checkout
uses: actions/checkout@v2
-
name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Set up Go
uses: actions/setup-go@v2
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
-
name: Set up QEMU
uses: docker/setup-qemu-action@v2
-
name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.17

Expand All @@ -80,7 +85,13 @@ jobs:
# path: ${{ github.workspace }}/.docker-creds
# contents: |
# ${{ secrets.DOCKERHUB_USERNAME }}:${{ secrets.DOCKER_PASSWORD }}:docker.io
-
name: goreleaser release-dry-run
run: make release-dry-run
if: "!startsWith(github.ref, 'refs/tags/v')"

- name: Run GoReleaser
-
name: goreleaser release
run: make release
if: startsWith(github.ref, 'refs/tags/v')

2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,5 @@ vendor/
dist
.release-env
.docker-creds
signatory
signatory-cli
4 changes: 4 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
FROM ubuntu:22.04
RUN apt-get update
RUN apt-get install -y curl apt-transport-https
RUN apt-get clean

COPY ./signatory /bin
COPY ./signatory-cli /bin

Expand Down
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ clean:

.PHONY: release-dry-run
release-dry-run:
sudo rm -rf ./dist
docker run \
--rm \
--privileged \
Expand All @@ -31,7 +32,7 @@ release-dry-run:
-v `pwd`:/go/src/$(PACKAGE_NAME) \
-w /go/src/$(PACKAGE_NAME) \
goreleaser/goreleaser-cross:${GOLANG_CROSS_VERSION} \
release --rm-dist --skip-validate --skip-publish
release --rm-dist --snapshot

.PHONY: release
release:
Expand Down

0 comments on commit aaa2087

Please sign in to comment.