Merge pull request #4 from makeopensource/ci/cd #3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Builds leviathan images on master | |
name: Build beta | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
build-docker: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write # to be able to publish a GitHub release | |
issues: write # to be able to comment on released issues | |
pull-requests: write # to be able to comment on released pull requests | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: 'Get tag' | |
id: tagName | |
uses: "WyriHaximus/github-action-get-previous-tag@v1" | |
## docker image build | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Login to Docker Hub | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build and push | |
uses: docker/build-push-action@v6 | |
with: | |
push: true | |
tags: ${{ github.repository }}:beta | |
# if the binary needs to built directly | |
# - name: Set up Go | |
# uses: actions/setup-go@v4 | |
# with: | |
# go-version: '1.22' | |
# - name: Install dependencies | |
# run: go mod tidy | |
# | |
# - name: Build | |
# run: go build -ldflags "-w -s" -o multipacman_linux_${{ steps.tagName.outputs.tag }} | |
# | |
# - name: Upload Release Asset | |
# uses: softprops/action-gh-release@v2 | |
# with: | |
# files: | | |
# multipacman_linux_${{ steps.tagName.outputs.tag }} | |
# tag_name: ${{ steps.tagName.outputs.tag }} | |
# env: | |
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |