Skip to content

Commit

Permalink
feat: build for release
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Dec 16, 2021
1 parent eed4c2c commit 3330932
Show file tree
Hide file tree
Showing 657 changed files with 11,932 additions and 6,371 deletions.
42 changes: 29 additions & 13 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,17 @@ on: [pull_request]

env:
RUNNER_TEMP: /tmp
TEST_ARTIFACT_VERSION: 0.6.2
TEST_ARTIFACT_VERSION: 0.6.10

jobs:
local_tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.3.4
- uses: actions/setup-node@v2.4.0
- uses: actions/checkout@v2.4.0

- uses: actions/setup-node@v2.5.0
with:
node-version: '16.x'
node-version: '17.x'
cache: 'npm'

- name: Install Dependencies
Expand All @@ -31,7 +32,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2.3.4
- uses: actions/checkout@v2.4.0

- name: Test the action
uses: ./
Expand All @@ -51,7 +52,8 @@ jobs:
test_build_then_publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.3.4
- uses: actions/checkout@v2.4.0

- name: Test the action - only build
uses: ./
with:
Expand All @@ -75,23 +77,37 @@ jobs:
snapshot:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.3.4
- uses: actions/checkout@v2.4.0

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1.5.1
uses: docker/setup-buildx-action@v1.6.0
with:
install: true

- name: Login to GitHub Container Registry
uses: docker/login-action@v1.10.0
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.CR_PAT }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Docker meta
id: meta
uses: docker/metadata-action@v3
with:
images: |
ghcr.io/artis3n/ansible_galaxy_collection-testartifact
tags: |
type=raw,value=SNAPSHOT-${{ github.sha }}
- name: Build and Push
uses: docker/build-push-action@v2.7.0
with:
context: .
platforms: linux/amd64
file: ./Dockerfile
push: true
tags: |
ghcr.io/artis3n/ansible_galaxy_collection-testartifact:SNAPSHOT-${{ github.sha }}
push: false
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
36 changes: 28 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,17 @@ on:
types:
- published

env:
IMAGE_NAME: artis3n/ansible_galaxy_collection

name: Release
jobs:
release:
name: Release GitHub Actions
runs-on: ubuntu-latest
steps:
- name: Semver release
uses: technote-space/release-github-actions@v7.0.6
uses: technote-space/release-github-actions@v7.1.0
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CLEAN_TARGETS: ''
Expand All @@ -19,27 +22,44 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2.3.4
- uses: actions/checkout@v2.4.0

- name: Get the version
run: echo "RELEASE_VERSION=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV

- name: Set up QEMU
uses: docker/setup-qemu-action@v1

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1.5.1
uses: docker/setup-buildx-action@v1.6.0
with:
install: true

- name: Docker meta
id: meta
uses: docker/metadata-action@v3
with:
images: |
ghcr.io/${{ env.IMAGE_NAME }}
tags: |
type=raw,value=latest
type=raw,value=${{ env.RELEASE_VERSION }}
- name: Login to GitHub Container Registry
uses: docker/login-action@v1.10.0
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.CR_PAT }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and Push
uses: docker/build-push-action@v2.7.0
with:
context: .
platforms: linux/amd64, linux/arm64
file: ./Dockerfile
push: true
tags: |
ghcr.io/artis3n/ansible_galaxy_collection:latest
ghcr.io/artis3n/ansible_galaxy_collection:${{ env.RELEASE_VERSION }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
2 changes: 1 addition & 1 deletion .node-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
16
17
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# Changelog

**All future changelog notes are published in the repository's [Releases](https://github.com/artis3n/ansible_galaxy_collection/releases) tab.**

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:16-slim
FROM node:17-slim

# Required for python inside Docker containers
ENV LC_ALL C.UTF-8
Expand All @@ -16,7 +16,7 @@ RUN apt-get update \
&& rm -rf /var/lib/apt/lists/*

RUN npm install -g npm \
&& python3 -m pip install --no-cache-dir --upgrade pip
&& python3 -m pip install --no-cache-dir --upgrade pip

COPY requirements.txt ./
RUN python3 -m pip install --no-cache-dir -r requirements.txt
Expand Down
2 changes: 1 addition & 1 deletion fake_collection/galaxy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace: artis3n
name: test_resource_do_not_use
version: 2.6.2
version: 2.6.10
readme: README.md
authors:
- Ari Kalfus (@artis3n) <dev@artis3nal.com>
Expand Down
53 changes: 53 additions & 0 deletions node_modules/@actions/core/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions node_modules/@actions/core/lib/core.d.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 8 additions & 1 deletion node_modules/@actions/core/lib/core.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion node_modules/@actions/core/lib/core.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/@actions/core/lib/utils.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 3330932

Please sign in to comment.