Skip to content

chore(deps): update actions/checkout action to v4.1.7 #23

chore(deps): update actions/checkout action to v4.1.7

chore(deps): update actions/checkout action to v4.1.7 #23

Workflow file for this run

---
name: Publish
on:
push:
branches:
- main
release:
types:
- created
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
with:
go-version: '^1.22.2'
- run: make promu
- run: promu crossbuild -v
- name: Store binaries artifacts
uses: actions/upload-artifact@0b2256b8c012f0828dc542b3febcab082c67f72b # v4.3.4
with:
name: build
path: .build
- name: Test binary
run: .build/linux-amd64/twitch_exporter --help
publish:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Download binaries artifacts
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
with:
name: build
path: .build
# See https://github.com/actions/upload-artifact/issues/38
- name: Fix permission on binaries artifacts
run: find . -type f -name 'twitch_exporter' -exec chmod +x {} +
- name: Login to Docker Hub
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- run: make docker DOCKER_IMAGE_TAG="${{ github.ref_name }}"
- run: make docker-publish DOCKER_IMAGE_TAG="${{ github.ref_name }}"
- run: make docker-manifest DOCKER_IMAGE_TAG="${{ github.ref_name }}"
- if: startsWith(github.ref, 'refs/tags/v')
run: |
make docker-tag-latest DOCKER_IMAGE_TAG="${{ github.ref_name }}"
make docker-publish DOCKER_IMAGE_TAG="latest"
make docker-manifest DOCKER_IMAGE_TAG="latest"
- run: docker run docker.io/damoun/twitch-exporter-linux-amd64:main --help