Merge branch 'uddugteam:main' into main #28
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
name: Lint and Test | |
on: | |
push: | |
pull_request: | |
workflow_dispatch: | |
concurrency: | |
group: ${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
build-image: | |
name: Build and push Docker image | |
if: ${{ github.ref == 'refs/heads/main' }} | |
runs-on: | |
- ubuntu-latest | |
outputs: | |
release_tag: ${{ steps.tag_version.outputs.new_tag }} | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v3 | |
- uses: docker/login-action@v1 | |
name: Login to Docker Hub | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Configure git for private modules | |
env: | |
TOKEN: ${{ secrets.PROXY_PIPELINES_GITHUB_TOKEN }} | |
run: git config --global url."https://oauth2:${TOKEN}@github.com/gateway-fm".insteadOf "https://github.com/gateway-fm" | |
- name: Bump version and push tag | |
id: tag_version | |
uses: mathieudutour/[email protected] | |
with: | |
github_token: ${{ secrets.RELEASES_ACTION_GITHUB_TOKEN }} | |
- name: Build and push Docker image | |
uses: docker/build-push-action@v2 | |
with: | |
context: . | |
push: true | |
tags: | | |
gatewayfm/oracle-flare:${{ steps.tag_version.outputs.new_tag }} | |
gatewayfm/oracle-flare:latest | |
secrets: | | |
"PROXY_PIPELINES_GITHUB_TOKEN=${{ secrets.PROXY_PIPELINES_GITHUB_TOKEN }}" | |
- name: Create a GitHub release | |
uses: ncipollo/release-action@v1 | |
with: | |
tag: ${{ steps.tag_version.outputs.new_tag }} | |
name: ${{ steps.tag_version.outputs.new_tag }} | |
body: ${{ steps.tag_version.outputs.changelog }} | |
token: ${{ secrets.RELEASES_ACTION_GITHUB_TOKEN }} | |
- name: Send notification to Slack | |
uses: skolobov/gh-action-slack@v1 | |
with: | |
status: ${{ job.status }} | |
steps: ${{ toJson(steps) }} | |
channel: "#proxy-builds" | |
env: | |
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} | |
if: failure() | |
- name: Clean workspace | |
uses: AutoModality/[email protected] |