diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 541ac9e..16580d4 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -15,6 +15,12 @@ jobs: - name: Unshallow run: git fetch --prune --unshallow + - name: Docker Login + env: + DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} + DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} + run: echo "${DOCKER_PASSWORD}" | docker login --username "${DOCKER_USERNAME}" --password-stdin + - name: Set up Go 1.x uses: actions/setup-go@v2 with: @@ -27,4 +33,7 @@ jobs: version: latest args: release --rm-dist env: - GITHUB_TOKEN: ${{ secrets.TOKEN_REPO }} \ No newline at end of file + GITHUB_TOKEN: ${{ secrets.TOKEN_REPO }} + + - name: Clear Docker credentials + run: rm -f ${HOME}/.docker/config.json \ No newline at end of file diff --git a/.goreleaser.yml b/.goreleaser.yml index 483ba8e..298ea9d 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -28,9 +28,25 @@ archives: - LICENSE - exampleConfig.yaml - templates/* + - static/* checksum: name_template: 'checksums.txt' changelog: - skip: true \ No newline at end of file + skip: true + +dockers: +- + image_templates: + - "arminc/lcm:latest" + - "arminc/lcm:{{ .Tag }}" + build_flag_templates: + - "--pull" + - "--label=org.opencontainers.image.created={{.Date}}" + - "--label=org.opencontainers.image.name={{.ProjectName}}" + - "--label=org.opencontainers.image.revision={{.FullCommit}}" + - "--label=org.opencontainers.image.version={{.Version}}" + extra_files: + - templates + - static \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..cb470ae --- /dev/null +++ b/Dockerfile @@ -0,0 +1,5 @@ +FROM scratch +COPY k8s-platform-lcm /lcm +COPY templates /templates +COPY static /static +ENTRYPOINT ["/lcm"] \ No newline at end of file