mirror of
https://github.com/fleetdm/fleet
synced 2026-05-23 17:08:53 +00:00
Bumps [actions/setup-go](https://github.com/actions/setup-go) from 2 to 3. - [Release notes](https://github.com/actions/setup-go/releases) - [Commits](https://github.com/actions/setup-go/compare/v2...f6164bd8c8acb4a71fb2791a8b6c4024ff038dab) --- updated-dependencies: - dependency-name: actions/setup-go dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
47 lines
1.5 KiB
YAML
47 lines
1.5 KiB
YAML
name: Docker publish
|
|
|
|
on: push
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
publish:
|
|
# Only run it when the push is to the fleetdm/fleet repo. Otherwise the secrets for pushing to
|
|
# Docker will not be available.
|
|
if: github.repository_owner == 'fleetdm'
|
|
runs-on: ubuntu-latest
|
|
environment: Docker Hub
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@629c2de402a417ea7690ca6ce3f33229e27606a5 # v2
|
|
|
|
- name: Login to Docker Hub
|
|
uses: docker/login-action@dd4fa0671be5250ee6f50aedf4cb05514abda2c7 # v1.10.0
|
|
with:
|
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
password: ${{ secrets.DOCKERHUB_ACCESS_TOKEN }}
|
|
|
|
- name: Set up Go
|
|
uses: actions/setup-go@f6164bd8c8acb4a71fb2791a8b6c4024ff038dab # v2
|
|
with:
|
|
go-version: 1.17.8
|
|
|
|
- name: Install Dependencies
|
|
run: make deps
|
|
|
|
- name: Run GoReleaser
|
|
uses: goreleaser/goreleaser-action@b953231f81b8dfd023c58e0854a721e35037f28b
|
|
with:
|
|
distribution: goreleaser-pro
|
|
version: latest
|
|
args: release --snapshot --rm-dist -f .goreleaser-snapshot.yml
|
|
env:
|
|
GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}
|
|
|
|
- name: Tag image with branch name
|
|
run: docker tag fleetdm/fleet:$(git rev-parse --short HEAD) fleetdm/fleet:$(git rev-parse --abbrev-ref HEAD)
|
|
|
|
# Explicitly push the docker images as GoReleaser will not do so in snapshot mode
|
|
- name: Publish Docker images
|
|
run: docker push fleetdm/fleet --all-tags
|